You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/03/04 21:52:45 UTC
[GitHub] [trafficcontrol] zrhoffman opened a new issue #5607: Cannot enable DNSSEC for CDN-in-a-Box CDN on CiaB startup
zrhoffman opened a new issue #5607:
URL: https://github.com/apache/trafficcontrol/issues/5607
<!--
************ STOP!! ************
If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact
the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
- For *SUPPORT QUESTIONS*, use the Traffic Control slack (https://s.apache.org/atc-slack)
or Traffic Control mailing lists (https://trafficcontrol.apache.org/mailing_lists).
- Before submitting, please **SEARCH GITHUB** for a similar issue or PR.
-->
## I'm submitting a ...
<!-- delete all those that don't apply -->
<!--- security vulnerability (STOP!! - see above)-->
- bug report
## Traffic Control components affected ...
<!-- delete all those that don't apply -->
- CDN in a Box
## Current behavior:
<!-- Describe how the bug manifests -->
If `"dnssecEnabled"` is changed from `false` to `true` in the CDN JSON:
https://github.com/apache/trafficcontrol/blob/cc8e93e99b690e812c6cf382dc80f0f891a64773/infrastructure/cdn-in-a-box/traffic_ops_data/cdns/010-CDN-in-a-Box.json#L1-L5
and the `trafficops` image is rebuilt, then enrolling the `demo1` Delivery Service will fail:
```shell
enroller_1 | INFO: enroller.go:215: 2021-03-04T17:55:49.578843521Z: error creating DeliveryService: requesting from Traffic Ops: 500 Internal Server Error[500] - Error requesting Traffic Ops https://trafficops.infra.ciab.test:443/api/4.0/deliveryservices {"alerts":[{"text":"Internal Server Error","level":"error"}]}
enroller_1 |
enroller_1 | INFO: enroller.go:834: 2021-03-04T17:55:49.57886606Z: error creating deliveryservices from /shared/enroller/deliveryservices/010-ciab.json: requesting from Traffic Ops: 500 Internal Server Error[500] - Error requesting Traffic Ops https://trafficops.infra.ciab.test:443/api/4.0/deliveryservices {"alerts":[{"text":"Internal Server Error","level":"error"}]}
```
## Expected behavior:
<!-- Describe what the behavior would be without the bug -->
Enabling DNSSEC for the *CDN-in-a-Box* CDN should succeed.
## Anything else:
<!--
e.g. stacktraces, related issues, suggestions how to fix (feel free to delete
this section)
-->
The Enroller's POST request to add the `demo1` Delivery Service fails because DNSSEC keys have not yet ben generated for `mycdn.ciab.test`. However, it is not as simple as making the Enroller generate DNSSEC keys for the *CDN-in-a-Box* CDN right after creating it, because Traffic Vault (required for DNSSEC key generation) probably has not yet finished starting up by this point.
So, [`traffic_ops/trafficops-init.sh`](https://github.com/apache/trafficcontrol/blob/cc8e93e99b/infrastructure/cdn-in-a-box/traffic_ops/trafficops-init.sh) probably needs to be responsible for generating DNSSEC keys before enrolling the JSON in the `deliveryservices` directory, which would require verifying that Traffic Vault has finished starting up.
A possible verification method would be waiting until `https://admin:riakAdmin@trafficvault.infra.ciab.test:8088/buckets/dnssec/keys?keys=true` returns a JSON array. Note: This check would require granting `riak_core.get_bucket` to the `riakAdmin` user in [`00-enable-security.sh`](https://github.com/apache/trafficcontrol/blob/cc8e93e99b/infrastructure/cdn-in-a-box/traffic_vault/poststart.d/00-enable-security.sh):
```shell
riak-admin security grant riak_core.get_bucket on any to admins
```
A hurdle to overcome for this verification method is that cURLing that URL from the CentOS 8-based `trafficops` service fails:
```
[user@computer cdn-in-a-box]$ docker-compose exec -- trafficops curl --tlsv1.1 --tls-max 1.1 -kvs curl --tlsv1.1 --tls-max 1.1 -kvs https://admin:riakAdmin@trafficvault.infra.ciab.test:8088/buckets/dnssec/keys?keys=true | vim -
* Rebuilt URL to: curl/
* Could not resolve host: curl
* Closing connection 0
* Trying 172.16.239.16...
* TCP_NODELAY set
* Connected to trafficvault.infra.ciab.test (172.16.239.16) port 8088 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* TLSv1.3 (OUT), TLS alert, internal error (592):
* error:141E70BF:SSL routines:tls_construct_client_hello:no protocols available
```
See: curl/curl#5356
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] zrhoffman removed a comment on issue #5607: Cannot enable DNSSEC for CDN in a Box on startup
Posted by GitBox <gi...@apache.org>.
zrhoffman removed a comment on issue #5607:
URL: https://github.com/apache/trafficcontrol/issues/5607#issuecomment-790975613
Or it could just try to POST `trafficops/api/4.0/cdns/dnsseckeys/generate` until that succeeds and only enroll the `deliveryservice` directory after that.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] zrhoffman edited a comment on issue #5607: Cannot enable DNSSEC for CDN in a Box on startup
Posted by GitBox <gi...@apache.org>.
zrhoffman edited a comment on issue #5607:
URL: https://github.com/apache/trafficcontrol/issues/5607#issuecomment-790975613
Or it could just try to POST `trafficops/api/4.0/cdns/dnsseckeys/generate` until that succeeds and only enroll the `deliveryservice` directory after that.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] zrhoffman commented on issue #5607: Cannot enable DNSSEC for CDN in a Box on startup
Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #5607:
URL: https://github.com/apache/trafficcontrol/issues/5607#issuecomment-790975613
Or it could just try to POST `trafficops/api/4.0/cdns/dnsseckeys/generate` until that succeeds.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org