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/01/12 00:34:46 UTC

[GitHub] [trafficcontrol] TaylorCFrey opened a new pull request #5423: Ensure SSL changes are logged.

TaylorCFrey opened a new pull request #5423:
URL: https://github.com/apache/trafficcontrol/pull/5423


   There are three endpoints (Add, Generate, Delete) that manipulate SSL certificates
   for a delivery service. (Actually there are more with the Let's Encrypt ACME
   endpoints, but those have a different changelog order of operations). These all
   must log their action in the Changelog for verification and confirmation when
   the actions complete. Generate and Delete succesfully log the changes, however
   Add was apparently not.
   
   In fact, there are two successful cases where the SSL keys could be added and
   the endpoint would return prematurely, preventing the action from being logged
   in the Changelog. The Changelog entry is now performed before the return of
   these two logic flows.
   
   Additionally added a comment to a public package function (Generate) and clarified
   language within the Changelog messages.
   
   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   
   - [X] This PR fixes #5339 
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   - Traffic Ops
   - Traffic Portal
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   
   This PR can be validated by performing curl requests against the various endpoints.
   
   You will need to replace the values where appropriate to work with your dataset (hostname, deliveryservice, key, cookies, etc.) Alternatively you can utilize TP for the Generate and Add/Update, but will need to use the `curl` call to Delete.
   
   ### Generate example
   ```
   curl --request POST \
     --url https://localhost:9090/api/3.1/deliveryservices/sslkeys/generate \
     --header 'Cookie: mojolicious={{cookie value}}' \
     --data '{"hostname":"*.unique-snowflake.xavier.localhost","country":"US","state":"New York","city":"Westchester","organization":"Marvel","businessUnit":"Xmen","version":7,"cdn":"xavier","deliveryservice":"unique-snowflake","key":"unique-snowflake"}'
   ```
   
   ### Add / Update example
   ```
   curl --request POST \
     --url https://localhost:9090/api/3.1/deliveryservices/sslkeys/add \
     --header 'Cookie: mojolicious={{Cookie Value}}' \
     --data '{"authType":"Self Signed","cdn":"xavier","deliveryservice":"unique-snowflake","businessUnit":"Xmen","city":"Westchester","organization":"Marvel","hostname":"*.unique-snowflake.xavier.localhost","country":"US","state":"New York","key":"unique-snowflake","version":8,"certificate":{"crt":"-----BEGIN CERTIFICATE-----\nMIID+TCCAuGgAwIBAgIQIBbwljulIIgo8iAnuzd+qDANBgkqhkiG9w0BAQsFADCB\nhDELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE5ldyBZb3JrMRQwEgYDVQQHEwtXZXN0\nY2hlc3RlcjEPMA0GA1UEChMGTWFydmVsMQ0wCwYDVQQLEwRYbWVuMSwwKgYDVQQD\nDCMqLnVuaXF1ZS1zbm93Zmxha2UueGF2aWVyLmxvY2FsaG9zdDAeFw0yMTAxMTIw\nMDI3MTdaFw0yMjAxMTIwMDI3MTdaMIGEMQswCQYDVQQGEwJVUzERMA8GA1UECBMI\nTmV3IFlvcmsxFDASBgNVBAcTC1dlc3RjaGVzdGVyMQ8wDQYDVQQKEwZNYXJ2ZWwx\nDTALBgNVBAsTBFhtZW4xLDAqBgNVBAMMIyoudW5pcXVlLXNub3dmbGFrZS54YXZp\nZXIubG9jYWxob3N0MIIBIjANBgkqhkiG9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/73hU5LD\nynTHAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAIenbNRJsOZ0qZyjCwQW7lYV4\nMRi1Gz2mBJeE7UB9DELa7KwXxpvjftFhZRe1xuB3JYjqVt/x6YYkpQLr+6PXrRqW\ncHsjO5Y+uTdpnP2CjuMA0nK3ssZMKEmUBTR5DXKUL6JR+QqL6psvfbI+DTCoa9ra\npRz+1QQY/wz+ejuGrbdGWPcRcSPpZo1nhJjwIIHlkI/aZ7FdFQxsniQkFP2IVhBg\nCPxE/8hNrdsnbJw5gGy0WbAOqTSRv2Bbwr0YhbgXK8AqnmTtoGKhKGe1x/UmMQIA\nkMqiiKN8g03aSZl3YWSxgnhOHJ19LNAFBTPqgOVO2gdt0XLYl4EoUiA25zKnUw==\n-----END CERTIFICATE REQUEST-----\n"},"expiration":"2022-01-12T00:27:17Z"}'
   ```
   
   ### Delete
   ```
   curl --request DELETE \
     --url https://localhost:9090/api/3.1/deliveryservices/xmlId/{{xmlID}}/sslkeys \
     --header 'Cookie: mojolicious={{Cooking Value}}'
   ```
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   <!-- If this PR fixes a bug, please list here all of the affected versions - to
   the best of your knowledge. It's also pretty helpful to include a commit hash
   of where 'master' is at the time this PR is opened (if it affects master),
   because what 'master' means will change over time. For example, if this PR
   fixes a bug that's present in master (at commit hash '1df853c8'), in v4.0.0,
   and in the current 4.0.1 Release candidate (e.g. RC1), then this list would
   look like:
   
   - master (1df853c8)
   - 4.0.0
   - 4.0.1 (RC1)
   
   If you don't know what other versions might have this bug, AND don't know how
   to find the commit hash of 'master', then feel free to leave this section
   blank (or, preferably, delete it entirely).
    -->
   
   master (0ad2086)
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [X] This PR includes tests OR I have explained why tests are unnecessary
   - [X] This PR includes documentation OR I have explained why documentation is unnecessary
   - [ ] This PR includes an update to CHANGELOG.md OR such an update is not necessary
   - [X] This PR includes any and all required license headers
   - [X] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   <!-- If you would like to include any additional information on the PR for
   potential reviewers please put it here.
   
   Some examples of this would be:
   
   - Before and after screenshots/gifs of the Traffic Portal if it is affected
   - Links to other dependent Pull Requests
   - References to relevant context (e.g. new/updates to dependent libraries,
   mailing list records, blueprints)
   
   Feel free to leave this section blank (or, preferably, delete it entirely).
   -->
   
   <!--
   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
   
       http://www.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] mattjackson220 merged pull request #5423: Ensure SSL changes are logged.

Posted by GitBox <gi...@apache.org>.
mattjackson220 merged pull request #5423:
URL: https://github.com/apache/trafficcontrol/pull/5423


   


----------------------------------------------------------------
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