blob: 97327646b2e5bf36fc1001e773f3d7e444797eee [file] [log] [blame]
Sai Gandham4e6f7bc2018-06-15 08:37:30 -05001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
4
5.. This work is licensed under a Creative Commons Attribution 4.0 International License.
6.. http://creativecommons.org/licenses/by/4.0
7.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
8
9AAF Integration Guide
10============================
11.. code:: bash
12
13 cadi.properties Template
14 # This is a normal Java Properties File
15 # Comments are with Pound Signs at beginning of lines,
16 # and multi-line expression of properties can be obtained by backslash at end of line
17 #hostname=
18
19 cadi_loglevel=WARN
20 cadi_keyfile=conf/keyfile
21
22
23 # Configure AAF
24 aaf_url=http://172.18.0.2:8101
25 #if you are running aaf service from a docker image you have to use aaf service IP and port number
26 aaf_id=<yourAPPID>@onap.org
27 aaf_password=enc:<encrypt>
28
29 aaf_dme_timeout=5000
30 # Note, User Expires for not Unit Test should be something like 900000 (15 mins) default is 10 mins
31 # 15 seconds is so that Unit Tests don't delay compiles, etc
32 aaf_user_expires=15000
33 # High count... Rough top number of objects held in Cache per cycle. If high is reached, more are
34 # recycled next time. Depending on Memory usage, 2000 is probably decent. 1000 is default
35 aaf_high_count=100
36
37
38How to create CADI Keyfile & Encrypt Password
39---------------------------------------------
40
41Password Encryption
42-------------------
43CADI provides a method to encrypt data so that Passwords and other sensitive data can be stored safely.
44
45Keygen (Generate local Symmetrical Key)
46A Keyfile is created by Cadi Utility.
47
48.. code:: bash
49
50 java -jar cadi-core-<version>.jar keygen <keyfile>
51Given this key file unlocks any passwords created, it should be stored in your configuration directory and protected with appropriate access permissions. For instance, if your container is Tomcat, and runs with a "tomcat" id, then you should:
52
53.. code:: bash
54
55 java -jar cadi-core-<version>.jar keygen keyfile
56 chmod 400 keyfile
57 chown tomcat:tomcat keyfile
58
59Digest - Encrypt a Password
60---------------------------
61The password is obtained by using the Cadi digest Utility (contained in the cadi-core-<version>.jar).
62
63.. code:: bash
64
65 java -jar cadi-core-<version>.jar digest <your_password> <keyfile>
66 "<keyfile>" is created by Cadi Utility, #keygen
67 Understand that if you change the keyfile, then you need to rerun "digest" on passwords used in the users/groups definitions.
68 Note: You cannot mix versions of cadi; the version used to digest your password must be the same version used at runtime.
69
70CADI PROPERTIES
71 CADI properties, typically named "cadi.properties", must have passwords encrypted.
72 1. Take the results of the "Digest" command and prepend "enc:"
73 2. Use this as the value of your property
74
75Example: aaf_password=enc:fMKMBfKHlRWL68cxD5XSIWNKRNYi5dih2LEHRFMIsut
76