Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 1 | .. contents:: |
| 2 | :depth: 3 |
| 3 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 4 | .. http://creativecommons.org/licenses/by/4.0 |
| 5 | .. Copyright © 2017 AT&T Intellectual Property. All rights reserved. |
| 6 | |
| 7 | Summary |
| 8 | Essentials |
| 9 | Technologies required to run AAF |
| 10 | Optional Technologies for special cases |
| 11 | Data Definitions |
| 12 | AAF Data Definitions |
| 13 | ILM (Identity Lifecycle Management) |
| 14 | Initializing Default Implementation |
| 15 | Extract Sample Configuration |
| 16 | Certificate Authority |
| 17 | Creating your own Certificate Authority (if desired) |
| 18 | Create your Intermediate CAs |
| 19 | Use the Intermediate CA for creating Service/Identity Certs (can be utilized by Certman with LocalCA) |
| 20 | Copy initializations to Host Machine |
| 21 | Load Data and/or Meta-Data into Cassandra |
| 22 | Build Source |
| 23 | Run Java |
| 24 | |
| 25 | Summary |
| 26 | ------- |
| 27 | |
| 28 | AAF Components are all Java(tm) HTTP/S based RESTful services, with the following exceptions: |
| 29 | |
| 30 | - AAF GUI component is an HTTP/S HTML5 generating component. It uses the same code base, but isn't strictly RESTful according to definition. |
| 31 | - AAF FS component is a FileServer, and is HTTP only (not TLS), so it can deliver publicly accessible artifacts without Authentication. |
| 32 | |
| 33 | Essentials |
| 34 | ========== |
| 35 | |
| 36 | Technologies required to run AAF |
| 37 | -------------------------------- |
| 38 | |
| 39 | - Java(tm). Version 8.121+ |
| 40 | - Oracle Java previous to Oracle Java SE 8 to version 8 Update 121 is vulnerable to "SWEET32" attack. |
| 41 | |
| 42 | 1369383 - CVE-2016-2183 SSL/TLS: Birthday attack against 64-bit block ciphers (SWEET32) |
| 43 | |
| 44 | - Cassandra, Version 2.1.14+ |
| 45 | - X509 Certificates (at minimum to support HTTP/S TLS transactions (TLS1.1 and TLS1.2 are default, but can be configured). |
| 46 | |
| 47 | Optional Technologies for special cases |
| 48 | --------------------------------------- |
| 49 | |
| 50 | - Build your own Certificate Authority for Bootstrapping and/or Certificate Manager component. |
| 51 | - openssl |
| 52 | - bash |
| 53 | |
| 54 | Data Definitions |
| 55 | ---------------- |
| 56 | |
| 57 | AAF Data Definitions |
| 58 | |
| 59 | - AAF is Data Driven, and therefore, needs to have some structure around the Initial Data so that it can function. You will need to define: |
| 60 | |
| 61 | Your Organization: |
| 62 | - Example: Are you a company? Do you already have a well known internet URL? |
| 63 | - If so, you should set up AAF Namespaces with this in mind. Example: |
| 64 | |
| 65 | - for "Kumquat Industries, LTD", with internet presence "kumquats4you.com" (currently, a fictitious name), you would want all your AAF Namespaces to start with: |
| 66 | |
| 67 | "com.kumquats4you" |
| 68 | The examples all use |
| 69 | |
| 70 | "org.osaaf" |
| 71 | |
| 72 | However it is recommended that you change this once you figure out your organizations' structure. |
| 73 | Your AAF Root Namespace |
| 74 | This can be within your company namespace, i.e. |
| 75 | |
| 76 | "com.kumquats4you.aaf" |
| 77 | |
| 78 | but you might consider putting it under different root structure. |
| 79 | Again, the bootstrapping examples use: |
| 80 | |
| 81 | "org.osaaf.aaf" |
| 82 | |
| 83 | While creating these, recognize that |
| 84 | 2nd position of the Namespace indicates company/organization |
| 85 | 3rd+ position are applications within that company/organization |
| 86 | |
| 87 | "com.kumquats4you.dmaap" |
| 88 | |
| 89 | Following this "positional" structure is required for expected Authorization behavior. |
| 90 | |
| 91 | |
| 92 | ILM (Identity Lifecycle Management) |
| 93 | Neither Authentication nor Authorization make any sense outside the context of Identity within your Organization. |
| 94 | |
| 95 | Some organizations or companies will have their own ILM managers. |
| 96 | |
| 97 | If so you may write your own implementation of "Organization" |
| 98 | Ensure the ILM of choice can be access real-time, or consider exporting the data into File Based mechanism (see entry) |
| 99 | AAF comes with a "DefaultOrganization", which implements a file based localization of ILM in a simple text file |
| 100 | |
| 101 | Each line represents an identity in the organization, including essential contact information, and reporting structure |
| 102 | This file can be updated by bringing in the entire file via ftp or other file transfer protocol, HOWEVER |
| 103 | Provide a process that |
| 104 | Validates no corruption has occurred |
| 105 | Pulls the ENTIRE file down before moving into the place where AAF Components will see it. |
| 106 | Take advantage of UNIX File System behaviors, by MOVING the file into place (mv), rather than copying while AAF is Active |
| 107 | Note: This file-based methodology has been shown to be extremely effective for a 1 million+ Identity organization |
| 108 | TBA-how to add an entry |
| 109 | |
| 110 | TBA-what does "sponsorship mean" |
| 111 | |
| 112 | Initializing Default Implementation |
| 113 | This is recommended for learning/testing AAF. You can modify and save off this information for your Organizational use at your discretion. |
| 114 | |
| 115 | Extract Sample Configuration |
| 116 | On your Linux box (creating/setting permissions as required) |
| 117 | |
| 118 | mkdir -p /opt/app/osaaf |
| 119 | |
| 120 | cd /opt/app/osaaf |
| 121 | |
| 122 | # Download AAF_sample_config_v1.zip (TBA) |
| 123 | |
| 124 | jar -xvf AAF_sample_config_v1.zip |
| 125 | |
| 126 | Certificate Authority |
| 127 | You need to identify a SAFE AND SECURE machine when working with your own Certificate Authority. Realize that if a hacker gets the private keys of your CA or Intermediate CAs, you will be TOTALLY Compromised. |
| 128 | |
| 129 | For that reason, many large companies will isolate any machines dealing with Certificates, and that is the recommendation here as well... However, this page cannot explain what works best for you. JSCEP is an option if you have this setup already. |
| 130 | |
| 131 | If you choose to make your own CA, at the very least, once you create your private key for your Root Cert, and your Intermediate Certs, you might consider saving your Private Keys off line and removing from the exposed box. Again, this is YOUR responsibility, and must follow your policy. |
| 132 | |
| 133 | |
| 134 | |
| 135 | IMPORTANT! As you create Certificates for Identities, the Identities you use MUST be identities in your ILM. See /opt/app/aaf/osaaf/data/identities.dat |
| 136 | |
| 137 | Creating your own Certificate Authority (if desired) |
| 138 | 1) Obtain all the Shell Scripts from the "conf/CA" directory which you can get the from the git repo. |
| 139 | |
| 140 | For this example, we'll put everything in /opt/app/osaaf |
| 141 | |
| 142 | mkdir /opt/app/osaaf/CA, if required |
| 143 | |
| 144 | $ cd /opt/app/osaaf/CA |
| 145 | |
| 146 | view README.txt for last minute info |
| 147 | |
ankatare | c187778 | 2018-09-06 12:18:52 +0530 | [diff] [blame^] | 148 | view and/or change "subject.aaf" for your needs. This format will be used on all generated certs from the CA. |
Sai Gandham | d67a9de | 2018-05-25 15:48:11 +0000 | [diff] [blame] | 149 | |
| 150 | $ cat subject.aaf |
| 151 | |
| 152 | If you will be using PKCS11 option, review the "cfg.pkcs11" file as well |
| 153 | |
| 154 | $ cat cfg.pkcs11 |
| 155 | |
| 156 | $ bash newca.sh |
| 157 | |
| 158 | Obviously, save off your passphrase in an encrypted place... how you do this is your procedure |
| 159 | |
| 160 | At this point, your Root CA information has been created. If you want to start over, you may use "bash clean.sh" |
| 161 | |
| 162 | Create your Intermediate CAs |
| 163 | 2) You do NOT sign regular Cert requests with your Root. You only sign with Intermediate CA. The "intermediate.sh" will create a NEW Intermediate CA Directory and copy appropriate Shell scripts over. Do this for as many Intermediate CAs as you need. |
| 164 | |
| 165 | $ bash newIntermediate.sh |
| 166 | |
| 167 | creates directories in order, intermediate_1, intermediate_2, etc. |
| 168 | |
| 169 | Use the Intermediate CA for creating Service/Identity Certs (can be utilized by Certman with LocalCA) |
| 170 | 3) When creating a Manual Certificate, DO THIS from the Intermediate CA needed |
| 171 | |
| 172 | $ cd intermediate_1 |
| 173 | |
| 174 | 4) Create initial Certificate for AAF |
| 175 | |
| 176 | IMPORTANT! As you create Certificates for Identities, the Identities you use MUST be identities in your ILM. See /opt/app/aaf/osaaf/data/identities.dat |
| 177 | |
| 178 | To create LOCALLY, meaning create the CSR, and submit immediately, do the following |
| 179 | |
| 180 | $ bash manual.sh <machine-name> -local |
| 181 | |
| 182 | FQI (Fully Qualified Identity): |
| 183 | |
| 184 | <identity from identities.dat>@<domain, ex: aaf.osaaf.org> |
| 185 | |
| 186 | To create Information suitable for Emailing, and signing the returned CSR |
| 187 | |
| 188 | $ bash manual.sh <machine-name> |
| 189 | |
| 190 | FQI (Fully Qualified Identity): |
| 191 | |
| 192 | <identity from identities.dat>@<domain, ex: aaf.osaaf.org> |
| 193 | |
| 194 | 5) Create p12 file for AAF |
| 195 | |
| 196 | REMAIN in the intermediate directory... |
| 197 | |
| 198 | $ bash p12.sh <machine-name> |
| 199 | |
| 200 | Copy initializations to Host Machine |
| 201 | AAF is setup so it can run |
| 202 | |
| 203 | On the O/S, using Java |
| 204 | On Docker |
| 205 | On K8 |
| 206 | In each case, even for Docker/K8, we utilize the File O/S for host specific information. This is because |
| 207 | |
| 208 | Many things are Host Specific |
| 209 | The Hostname required for TLS interactions |
| 210 | Cassandra specific information (when external/clustered) |
| 211 | Logging (if logging is done in container, it will be lost if container goes down) |
| 212 | To make things simpler, we are assuming that the file structure will be "/opt/app/osaaf". The code supports changing this, but documentation will wait until use cases arises for ONAP. |
| 213 | |
| 214 | Steps: |
| 215 | |
| 216 | 1) Copy "osaaf.zip" to your Host Machine, where osaaf.zip is provided by AAF SME. // TODO POST SAMPLE HERE |
| 217 | |
| 218 | 2) Copy your "p12" file generated by your CA (see above), and place in your "certs" directory |
| 219 | |
| 220 | 3) SSH (or otherwise login) to your Docker/K8 Host Machine |
| 221 | |
| 222 | 4) setup your directories (you might need to be root, then adjust what you need for O/S File Permissions |
| 223 | |
| 224 | $ mkdir /opt/app/osaaf |
| 225 | |
| 226 | $ cd /opt/app/osaaf |
| 227 | |
| 228 | $ mkdir cred logs |
| 229 | |
| 230 | $ unzip ~/osaaf.zip |
| 231 | |
| 232 | $ mv ~/<p12 file from CA above> cred |
| 233 | |
| 234 | $ |
| 235 | |
| 236 | Unzip the "osaaf.zip" so it goes into the /opt/app/osaaf directory (should have "etc", "data", "public" and "certs" directories) |
| 237 | |
| 238 | 4) Modify "org.osaaf.props" to have |
| 239 | |
| 240 | |
| 241 | |
| 242 | Load Data and/or Meta-Data into Cassandra |
| 243 | Setting this initial Data can be done directly onto Cassadra using "cqlsh" using the following "cql" files: |
| 244 | |
| 245 | init<version>.cql (whatever is latest in the "zip" file) |
| 246 | osaaf.cql |
| 247 | This file contains initial Authorization Structures, see AAF Data Structures. |
| 248 | This is where you would modify your own initial Structures. |
| 249 | Build Source |
| 250 | (if not done already) |
| 251 | |
| 252 | Run Java |
| 253 | Note: If you have a Kubernets requirement (support), it is STILL RECOMMENDED you run AAF as stand-alone Java Components on your system, and work out any modifications required BEFORE trying to run in Kubernetes. |
| 254 | |
| 255 | TBA <java -Dcadi_prop_files=/opt/app/osaaf/etc/org.osaaf.locator.props -cp <path> File> |
| 256 | |