Skip to content

Commit 49cd720

Browse files
chore: Move token definition into a secret (#192)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description Moves the userinfo auth token field into a secret environment variable. This means that we won't accidentally save api key values into git (because secret values aren't saved to file) ## Context <!-- Why is this change required? What problem does it solve? --> ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [x] Refactoring (non-breaking change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have followed the code style of the project - [ ] I have added tests to cover my changes - [ ] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming - [ ] Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request. --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [ ] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent e156430 commit 49cd720

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

bruno/gateway-api/collections/APIM/User_Info.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ info:
55

66
http:
77
method: GET
8-
url: https://internal-dev.api.service.nhs.uk/oauth2-mock/userinfo
8+
url: https://{{host}}/oauth2-mock/userinfo
99
auth:
1010
type: bearer
11-
token: ""
11+
token: "{{token}}"
1212

1313
settings:
1414
encodeUrl: true
1515
timeout: 0
1616
followRedirects: true
1717
maxRedirects: 5
18+
19+
docs: Use the `token` environment variable to set the Authorization header. Do not enter it directly into the header. This ensures that the value is never saved into git.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: internal-dev
2+
variables:
3+
- name: host
4+
value: internal-dev.api.service.nhs.uk
5+
- secret: true
6+
name: token

0 commit comments

Comments
 (0)