Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 1 | .. vim: syntax=rst |
| 2 | |
| 3 | Aether ROC Developer Guide |
| 4 | ========================== |
| 5 | |
| 6 | Background / Development Environment |
| 7 | ------------------------------------ |
| 8 | |
| 9 | This document assumes familiarity with Kubernetes and Helm, and that a Kubernetes/Helm development |
| 10 | environment has already been deployed in the developer’s work environment. |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 11 | |
| 12 | This development environment can use any of a number of potential mechanisms -- including KinD, kubeadm, etc. |
| 13 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 14 | The Aether-in-a-Box script is one potential way to setup a development environment, but not the only way. |
| 15 | As an alternative to the developer’s local machine, a remote environment can be set up, for example on |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 16 | cloud infrastructure such as Cloudlab. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 17 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 18 | .. note:: When ROC is deployed it is unsecured by default, with no Authentication or Authorization. |
| 19 | To secure ROC so that the Authentication and Authorization can be tested, follow the Securing ROC |
| 20 | guide below :ref:`securing_roc` |
| 21 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 22 | Installing Prerequisites |
| 23 | ------------------------ |
| 24 | |
| 25 | Atomix and onos-operator must be installed:: |
| 26 | |
| 27 | # create necessary namespaces |
| 28 | kubectl create namespace micro-onos |
| 29 | |
| 30 | # install atomix |
Sean Condon | 70dcf70 | 2021-08-24 10:57:29 +0100 | [diff] [blame] | 31 | export ATOMIX_CONTROLLER_VERSION=0.6.8 |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 32 | helm -n kube-system install atomix-controller atomix/atomix-controller --version $ATOMIX_CONTROLLER_VERSION |
Sean Condon | 70dcf70 | 2021-08-24 10:57:29 +0100 | [diff] [blame] | 33 | export ATOMIX_RAFT_VERSION=0.1.9 |
| 34 | helm -n kube-system install atomix-raft-storage atomix/atomix-raft-storage --version $ATOMIX_RAFT_VERSION |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 35 | |
| 36 | # install the onos operator |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 37 | ONOS_OPERATOR_VERSION=0.4.8 |
| 38 | helm install -n kube-system onos-operator onosproject/onos-operator --version $ONOS_OPERATOR_VERSION |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 39 | |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 40 | .. note:: The ROC is sensitive to the versions of Atomix and onos-operator installed. The values |
| 41 | shown above are correct for the 1.2.x versions of the *aether-roc-umbrella*. |
| 42 | |
| 43 | .. list-table:: ROC support component version matrix |
Sean Condon | 70dcf70 | 2021-08-24 10:57:29 +0100 | [diff] [blame] | 44 | :widths: 40 20 20 20 |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 45 | :header-rows: 1 |
| 46 | |
| 47 | * - ROC Version |
| 48 | - Atomix Controller |
| 49 | - Atomix Raft |
| 50 | - Onos Operator |
Sean Condon | 70dcf70 | 2021-08-24 10:57:29 +0100 | [diff] [blame] | 51 | * - 1.2.25-1.2.45 |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 52 | - 0.6.7 |
| 53 | - 0.1.8 |
| 54 | - 0.4.8 |
Sean Condon | 70dcf70 | 2021-08-24 10:57:29 +0100 | [diff] [blame] | 55 | * - 1.3.0- |
| 56 | - 0.6.8 |
| 57 | - 0.1.9 |
| 58 | - 0.4.8 |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 59 | |
| 60 | Verify that these services were installed properly. |
| 61 | You should see pods for *atomix-controller*, *atomix-raft-storage-controller*, |
| 62 | *onos-operator-config*, and *onos-operator-topo*. |
| 63 | Execute these commands:: |
| 64 | |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 65 | helm -n kube-system list |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 66 | kubectl -n kube-system get pods | grep -i atomix |
| 67 | kubectl -n kube-system get pods | grep -i onos |
| 68 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 69 | Create a values-override.yaml |
| 70 | ----------------------------- |
| 71 | |
| 72 | You’ll want to override several of the defaults in the ROC helm charts:: |
| 73 | |
| 74 | cat > values-override.yaml <<EOF |
| 75 | import: |
Scott Baker | b46a6ed | 2021-08-02 14:03:10 -0700 | [diff] [blame] | 76 | onos-gui: |
| 77 | enabled: true |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 78 | |
| 79 | onos-gui: |
Scott Baker | b46a6ed | 2021-08-02 14:03:10 -0700 | [diff] [blame] | 80 | ingress: |
| 81 | enabled: false |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 82 | |
| 83 | aether-roc-gui-v3: |
Scott Baker | b46a6ed | 2021-08-02 14:03:10 -0700 | [diff] [blame] | 84 | ingress: |
| 85 | enabled: false |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 86 | EOF |
| 87 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 88 | Installing the ``aether-roc-umbrella`` Helm chart |
| 89 | ------------------------------------------------- |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 90 | |
| 91 | Add the necessary helm repositories:: |
| 92 | |
| 93 | # obtain username and password from Michelle and/or ONF infra team |
| 94 | export repo_user=<username> |
| 95 | export repo_password=<password> |
| 96 | helm repo add sdran --username "$repo_user" --password "$repo_password" https://sdrancharts.onosproject.org |
| 97 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 98 | ``aether-roc-umbrella`` will bring up the ROC and its services:: |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 99 | |
| 100 | helm -n micro-onos install aether-roc-umbrella sdran/aether-roc-umbrella -f values-override.yaml |
| 101 | |
| 102 | kubectl wait pod -n micro-onos --for=condition=Ready -l type=config --timeout=300s |
| 103 | |
| 104 | |
Sean Condon | f918f64 | 2021-08-04 14:32:53 +0100 | [diff] [blame] | 105 | .. _posting-the-mega-patch: |
| 106 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 107 | Posting the mega-patch |
| 108 | ---------------------- |
| 109 | |
| 110 | The ROC usually comes up in a blank state -- there are no Enterprises, UEs, or other artifacts present in it. |
| 111 | The mega-patch is an example patch that populates the ROC with some sample enterprises, UEs, slices, etc. |
| 112 | Execute the following:: |
| 113 | |
| 114 | # launch a port-forward for the API |
| 115 | # this will continue to run in the background |
| 116 | kubectl -n micro-onos port-forward service/aether-roc-api --address 0.0.0.0 8181:8181 & |
| 117 | |
| 118 | git clone https://github.com/onosproject/aether-roc-api.git |
| 119 | |
| 120 | # execute the mega-patch (it will post via CURL to localhost:8181) |
| 121 | bash ~/path/to/aether-roc-api/examples/MEGA_Patch.curl |
| 122 | |
| 123 | |
| 124 | You may wish to customize the mega patch. |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 125 | |
| 126 | For example, by default the patch configures the ``sdcore-adapter`` to push to |
| 127 | ``sdcore-test-dummy``. |
| 128 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 129 | You could configure it to push to a live aether-in-a-box core by doing something like this:: |
| 130 | |
| 131 | sed -i 's^http://aether-roc-umbrella-sdcore-test-dummy/v1/config/5g^http://webui.omec.svc.cluster.local:9089/config^g' MEGA_Patch.curl |
| 132 | |
| 133 | #apply the patch |
| 134 | ./MEGA_Patch.curl |
| 135 | |
| 136 | (Note that if your Aether-in-a-Box was installed on a different machine that port-forwarding may be necessary) |
| 137 | |
| 138 | |
| 139 | Expected CURL output from a successful mega-patch post will be a UUID. |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 140 | |
| 141 | You can also verify that the mega-patch was successful by going into the |
| 142 | ``aether-roc-gui`` in a browser (see the section on useful port-forwards |
| 143 | below). The GUI may open to a dashboard that is unpopulated -- you can use the |
| 144 | dropdown menu (upper-right hand corner of the screen) to select an object such |
| 145 | as VCS and you will see a list of VCS. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 146 | |
| 147 | |ROCGUI| |
| 148 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 149 | Uninstalling the ``aether-roc-umbrella`` Helm chart |
| 150 | --------------------------------------------------- |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 151 | |
| 152 | To tear things back down, usually as part of a developer loop prior to redeploying again, do the following:: |
| 153 | |
| 154 | helm -n micro-onos del aether-roc-umbrella |
| 155 | |
| 156 | If the uninstall hangs or if a subsequent reinstall hangs, it could be an issue with some of the CRDs |
| 157 | not getting cleaned up. The following may be useful:: |
| 158 | |
| 159 | # fix stuck finalizers in operator CRDs |
| 160 | |
| 161 | kubectl -n micro-onos patch entities connectivity-service-v2 --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' |
| 162 | |
| 163 | kubectl -n micro-onos patch entities connectivity-service-v3 --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' |
| 164 | |
| 165 | kubectl -n micro-onos patch kind aether --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' |
| 166 | |
| 167 | Useful port forwards |
| 168 | -------------------- |
| 169 | |
| 170 | Port forwarding is often necessary to allow access to ports inside of Kubernetes pods that use ClusterIP addressing. |
| 171 | Note that you typically need to leave a port-forward running (you can put it in the background). |
| 172 | Also, If you redeploy the ROC and/or if a pod crashes then you might have to restart a port-forward. |
| 173 | The following port-forwards may be useful:: |
| 174 | |
| 175 | # aether-roc-api |
| 176 | |
| 177 | kubectl -n micro-onos port-forward service/aether-roc-api --address 0.0.0.0 8181:8181 |
| 178 | |
| 179 | # aether-roc-gui |
| 180 | |
| 181 | kubectl -n micro-onos port-forward service/aether-roc-gui --address 0.0.0.0 8183:80 |
| 182 | |
| 183 | # grafana |
| 184 | |
| 185 | kubectl -n micro-onos port-forward service/aether-roc-umbrella-grafana --address 0.0.0.0 8187:80 |
| 186 | |
| 187 | # onos gui |
| 188 | |
| 189 | kubectl -n micro-onos port-forward service/onos-gui --address 0.0.0.0 8182:80 |
| 190 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 191 | ``aether-roc-api`` and ``aether-roc-gui`` are in our experience the most useful two port-forwards. |
| 192 | |
| 193 | ``aether-roc-api`` is useful to be able to POST REST API requests. |
| 194 | |
| 195 | ``aether-roc-gui`` is useful to be able to interactively browse the current configuration. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 196 | |
Sean Condon | 257687f | 2021-08-23 11:13:20 +0100 | [diff] [blame] | 197 | .. note:: Internally the ``aether-roc-gui`` operates a Reverse Proxy on the ``aether-roc-api``. This |
| 198 | means that if you have done a ``port-forward`` to ``aether-roc-gui`` say on port ``8183`` there's no |
| 199 | need to do another on the ``aether-roc-api`` instead you can access the API on |
| 200 | ``http://localhost:8183/aether-roc-api`` |
| 201 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 202 | Deploying using custom images |
| 203 | ----------------------------- |
| 204 | |
| 205 | Custom images may be used by editing the values-override.yaml file. |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 206 | For example, to deploy a custom ``sdcore-adapter``:: |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 207 | |
| 208 | sdcore-adapter-v3: |
| 209 | |
| 210 | prometheusEnabled: false |
| 211 | |
| 212 | image: |
| 213 | |
| 214 | repository: my-private-repo/sdcore-adapter |
| 215 | |
| 216 | tag: my-tag |
| 217 | |
| 218 | pullPolicy: Always |
| 219 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 220 | The above example assumes you have published a docker images at ``my-private-repo/sdcore-adapter:my-tag``. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 221 | My particular workflow is to deploy a local-docker registry and push my images to that. |
| 222 | Please do not publish ONF images to a public repository unless the image is intended to be public. |
| 223 | Several ONF repositories are private, and therefore their docker artifacts should also be private. |
| 224 | |
| 225 | There are alternatives to using a private docker repository. |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 226 | For example, if you are using kubeadm, then you may be able to simply tag the image locally. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 227 | If you’re using KinD, then you can push a local image to into the kind cluster:: |
| 228 | |
| 229 | kind load docker-image sdcore-adapter:my-tag |
| 230 | |
| 231 | Inspecting logs |
| 232 | --------------- |
| 233 | |
| 234 | Most of the relevant Kubernetes pods are in the micro-onos namespace. |
| 235 | The names may change from deployment to deployment, so start by getting a list of pods:: |
| 236 | |
| 237 | kubectl -n micro-onos get pods |
| 238 | |
| 239 | Then you can inspect a specific pod/container:: |
| 240 | |
| 241 | kubectl -n micro-onos logs sdcore-adapter-v3-7468cc58dc-ktctz sdcore-adapter-v3 |
| 242 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 243 | .. _securing_roc: |
| 244 | |
| 245 | Securing ROC |
| 246 | ------------ |
| 247 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 248 | When deploying ROC with the ``aether-roc-umbrella`` chart, secure mode can be enabled by |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 249 | specifying an OpenID Connect (OIDC) issuer like:: |
| 250 | |
| 251 | helm -n micro-onos install aether-roc-umbrella sdran/aether-roc-umbrella \ |
| 252 | --set onos-config.openidc.issuer=http://dex-ldap-umbrella:5556 \ |
| 253 | --set aether-roc-gui-v3.openidc.issuer=http://dex-ldap-umbrella:5556 |
| 254 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 255 | The choice of OIDC issuer in this case is ``dex-ldap-umbrella``. |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 256 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 257 | ``dex-ldap-umbrella`` |
| 258 | """"""""""""""""""""" |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 259 | |
| 260 | Dex is a cloud native OIDC Issuer than can act as a front end to several authentication systems |
| 261 | e.g. LDAP, Crowd, Google, GitHub |
| 262 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 263 | ``dex-ldap-umbrella`` is a Helm chart that combines a Dex server with an LDAP |
| 264 | installation, and an LDAP administration tool. It can be deployed in to the |
| 265 | same cluster namespace as ``aether-roc-umbrella``. |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 266 | |
| 267 | Its LDAP server is populated with 7 different users in the 2 example enterprises - *starbucks* and *acme*. |
| 268 | |
| 269 | When running it should be available at *http://dex-ldap-umbrella:5556/.well-known/openid-configuration*. |
| 270 | |
| 271 | See `dex-ldap-umbrella <https://github.com/onosproject/onos-helm-charts/tree/master/dex-ldap-umbrella#readme>`_ |
| 272 | for more details. |
| 273 | |
| 274 | As an alternative there is a public Dex server connected to the ONF Crowd server, that allows |
| 275 | ONF staff to login with their own credentials: |
| 276 | See `public dex <https://dex.aetherproject.org/dex/.well-known/openid-configuration>`_ for more details. |
| 277 | |
| 278 | .. note:: Your RBAC access to ROC will be limited by the groups you belong to in Crowd. |
| 279 | |
| 280 | Role Based Access Control |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 281 | """"""""""""""""""""""""" |
| 282 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 283 | When secured, access to the configuration in ROC is limited by the **groups** that a user belongs to. |
| 284 | |
| 285 | * **AetherROCAdmin** - users in this group have full read **and** write access to all configuration. |
| 286 | * *<enterprise>* - users in a group the lowercase name of an enterprise, will have **read** access to that enterprise. |
| 287 | * **EnterpriseAdmin** - users in this group will have read **and** write access the enterprise they belong to. |
| 288 | |
| 289 | For example in *dex-ldap-umbrella* the user *Daisy Duke* belongs to *starbucks* **and** |
| 290 | *EnterpriseAdmin* and so has read **and** write access to items linked with *starbucks* enterprise. |
| 291 | |
| 292 | By comparison the user *Elmer Fudd* belongs only to *starbucks* group and so has only **read** access to items |
| 293 | linked with the *starbucks* enterprise. |
| 294 | |
| 295 | Requests to a Secure System |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 296 | """"""""""""""""""""""""""" |
| 297 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 298 | When configuration is retrieved or updated through *aether-config*, a Bearer Token in the |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 299 | form of a JSON Web Token (JWT) issued by the selected OIDC Issuer server must accompany |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 300 | the request as an Authorization Header. |
| 301 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 302 | This applies to both the REST interface of ``aether-roc-api`` **and** the *gnmi* interface of |
| 303 | ``aether-rconfig``. |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 304 | |
| 305 | In the Aether ROC, a Bearer Token can be generated by logging in and selecting API Key from the |
| 306 | menu. This pops up a window with a copy button, where the key can be copied. |
| 307 | |
| 308 | The key will expire after 24 hours. |
| 309 | |
| 310 | .. image:: images/aether-roc-gui-copy-api-key.png |
| 311 | :width: 580 |
| 312 | :alt: Aether ROC GUI allows copying of API Key to clipboard |
| 313 | |
| 314 | Accessing the REST interface from a tool like Postman, should include this Auth token. |
| 315 | |
| 316 | .. image:: images/postman-auth-token.png |
| 317 | :width: 930 |
| 318 | :alt: Postman showing Authentication Token pasted in |
| 319 | |
| 320 | Logging |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 321 | """"""" |
| 322 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 323 | The logs of *aether-config* will contain the **username** and **timestamp** of |
| 324 | any **gnmi** call when security is enabled. |
| 325 | |
| 326 | .. image:: images/aether-config-log.png |
| 327 | :width: 887 |
| 328 | :alt: aether-config log message showing username and timestamp |
| 329 | |
Sean Condon | 435be9a | 2021-08-06 14:28:37 +0100 | [diff] [blame] | 330 | Accessing GUI from an external system |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 331 | """"""""""""""""""""""""""""""""""""" |
| 332 | |
Sean Condon | 435be9a | 2021-08-06 14:28:37 +0100 | [diff] [blame] | 333 | To access the ROC GUI from a computer outside the Cluster machine using *port-forwarding* then |
| 334 | it is necessary to: |
| 335 | |
| 336 | * Ensure that all *port-forward*'s have **--address=0.0.0.0** |
| 337 | * Add to the IP address of the cluster machine to the **/etc/hosts** of the outside computer as:: |
| 338 | |
| 339 | <ip address of cluster> dex-ldap-umbrella aether-roc-gui |
| 340 | * Verify that you can access the Dex server by its name *http://dex-ldap-umbrella:5556/.well-known/openid-configuration* |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 341 | * Access the GUI through the hostname (rather than ip address) ``http://aether-roc-gui:8183`` |
Sean Condon | 435be9a | 2021-08-06 14:28:37 +0100 | [diff] [blame] | 342 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 343 | Troubleshooting Secure Access |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 344 | """"""""""""""""""""""""""""" |
| 345 | |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 346 | While every effort has been made to ensure that securing Aether is simple and effective, |
| 347 | some difficulties may arise. |
| 348 | |
| 349 | One of the most important steps is to validate that the OIDC Issuer (Dex server) can be reached |
| 350 | from the browser. The **well_known** URL should be available and show the important endpoints are correct. |
| 351 | |
| 352 | .. image:: images/dex-ldap-umbrella-well-known.png |
| 353 | :width: 580 |
| 354 | :alt: Dex Well Known page |
| 355 | |
| 356 | If logged out of the Browser when accessing the Aether ROC GUI, accessing any page of the application should |
| 357 | redirect to the Dex login page. |
| 358 | |
| 359 | .. image:: images/dex-ldap-login-page.png |
| 360 | :width: 493 |
| 361 | :alt: Dex Login page |
| 362 | |
| 363 | When logged in the User details can be seen by clicking the User's name in the drop down menu. |
| 364 | This shows the **groups** that the user belongs to, and can be used to debug RBAC issues. |
| 365 | |
| 366 | .. image:: images/aether-roc-gui-user-details.png |
| 367 | :width: 700 |
| 368 | :alt: User Details page |
| 369 | |
| 370 | When you sign out of the ROC GUI, if you are not redirected to the Dex Login Page, |
| 371 | you should check the Developer Console of the browser. The console should show the correct |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 372 | OIDC issuer (Dex server), and that Auth is enabled. |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 373 | |
| 374 | .. image:: images/aether-roc-gui-console-loggedin.png |
| 375 | :width: 418 |
| 376 | :alt: Browser Console showing correct configuration |
| 377 | |
Scott Baker | b46a6ed | 2021-08-02 14:03:10 -0700 | [diff] [blame] | 378 | ROC Data Model Conventions and Requirements |
| 379 | ------------------------------------------- |
| 380 | |
| 381 | The MEGA-Patch described above will bring up a fully compliant sample data model. |
| 382 | However, it may be useful to bring up your own data model, customized to a different |
| 383 | site of sites. This subsection documents conventions and requirements for the Aether |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 384 | modeling within the ROC. |
Scott Baker | b46a6ed | 2021-08-02 14:03:10 -0700 | [diff] [blame] | 385 | |
| 386 | The ROC models must be configured with the following: |
| 387 | |
| 388 | * A default enterprise with the id `defaultent`. |
| 389 | * A default ip-domain with the id `defaultent-defaultip`. |
| 390 | * A default site with the id `defaultent-defaultsite`. |
| 391 | This site should be linked to the `defaultent` enterprise. |
| 392 | * A default device group with the id `defaultent-defaultsite-default`. |
| 393 | This device group should be linked to the `defaultent-defaultip` ip-domain |
| 394 | and the `defaultent-defaultsite` site. |
| 395 | |
| 396 | Each Enterprise Site must be configured with a default device group and that default |
| 397 | device group's name must end in the suffix `-default`. For example, `acme-chicago-default`. |
| 398 | |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 399 | Some exercises to get familiar |
| 400 | ------------------------------ |
| 401 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 402 | 1. Deploy the ROC and POST the mega-patch, go into the ``aether-roc-gui`` and click |
| 403 | through the VCS, DeviceGroup, and other objects to see that they were |
| 404 | created as expected. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 405 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 406 | 2. Examine the log of the ``sdcore-adapter-v3`` container. It should be |
| 407 | attempting to push the mega-patch’s changes. If you don’t have a core |
| 408 | available, it may be failing the push, but you should see the attempts. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 409 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 410 | 3. Change an object in the GUI. Watch the ``sdcore-adapter-v3`` log file and |
| 411 | see that the adapter attempts to push the change. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 412 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 413 | 4. Try POSTing a change via the API. Observe the ``sdcore-adapter-v3`` log |
| 414 | file and see that the adapter attempts to push the change. |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 415 | |
Zack Williams | 1ae109e | 2021-07-27 11:17:04 -0700 | [diff] [blame] | 416 | 5. Deploy a 5G Aether-in-a-Box (See :doc:`Aether SD-Core Developer Guide |
| 417 | <sdcore>`), modify the mega-patch to specify the URL for the Aether-in-a-Box |
| 418 | ``webui`` container, POST the mega-patch, and observe that the changes were |
| 419 | correctly pushed via the ``sdcore-adapter-v3`` into the ``sd-core``’s |
| 420 | ``webui`` container (``webui`` container log will show configuration as it |
| 421 | is received) |
Scott Baker | fab7c9e | 2021-07-29 17:12:16 -0700 | [diff] [blame] | 422 | |
| 423 | .. |ROCGUI| image:: images/rocgui.png |
Sean Condon | eb95cd6 | 2021-08-04 19:44:18 +0100 | [diff] [blame] | 424 | :width: 945 |
| 425 | :alt: ROC GUI showing list of VCS |