Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-23607: Rotate fleet manager static tokens #1760

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
{
"type": "Base64 High Entropy String",
"filename": "config/jwks-file-static.json",
"hashed_secret": "3744e3d32aa35c3bb53d76d1832699b723f07812",
"hashed_secret": "3fb3c5865e6594120f0007ec7f6983a563f51eff",
"is_verified": false,
"line_number": 41
}
Expand Down Expand Up @@ -403,13 +403,6 @@
"is_verified": false,
"line_number": 511
},
{
"type": "Base64 High Entropy String",
"filename": "templates/service-template.yml",
"hashed_secret": "14736999d9940728c5294277831a702f7882dece",
"is_verified": false,
"line_number": 548
},
{
"type": "Secret Keyword",
"filename": "templates/service-template.yml",
Expand Down Expand Up @@ -445,5 +438,5 @@
}
]
},
"generated_at": "2024-03-21T17:47:35Z"
"generated_at": "2024-04-11T16:27:17Z"
}
2 changes: 1 addition & 1 deletion config/jwks-file-static.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"use": "sig",
"kid": "acs-dev-bitwarden-static-token-jwks",
"alg": "RS256",
"n": "s6bi3xECYj1V_QksbRme4wRMm9X8NoCPqqYRqn3PGTYSpNpTsvOohSd2b3gtbtR_89N1YXFYbjMmk-dqaaZNGCVfg45KuCjaore62yiExAzMA8N-gw6IiBXe6TUN6kZP84OLDhfDZXmrpL1tOepWY1mSAN3IT_lmDFqU06MS7AXOTz7qWXOp6s_-Bwbl3GmP6OhAdc955-WAizTxiWdKWGZ0aXlhP167GE45IRjVarB_TIemDYfN1PBfznfgW7F4JZvwzC--oiH2mps8xaDvby7Y0W-LHFL_64lXgTs1OW9vcIisSH-1YsiVIraQDbiVtNTjzDrF7ouNKSL5uTQ2pQ"
"n": "sOxtMpVCVOUu0eX-yJ6PTv4yTTunZFQDvkbR4DM5XJ4nwyPYZpCFu9CnHbmnyUm6TVAbaESYGz8FR4ljb9QsEJMox1SMX_2_q2vNGh_l3_3OHsvJSgtW0fZb-V9nXm40iYbZlvHEqZuhkfKbd6mKtWq6Lz5tV-Y5WgAbxkMAe240MT9XxBdNn-uiwrGuQFYbl3628ECpG6XF7NAuhytaypgddSy4j0Md98tqg1pjT8jPGl-iBKJpv9zMPv-b78ZwrRn_4EDWlc3CqyzuTvu1sW_FnqvPPfMfyuxkk2iSrVFad1bqk23A3oALWWingJdIkD03gmGTFcd9h9s0_XfeJQ"
}
]
}
36 changes: 36 additions & 0 deletions config/static-token-admin-payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"account_id": "12345678",
"account_number": "1234567",
"acr": "0",
"aud": "cloud-services",
"azp": "cloud-services",
"email": "[email protected]",
"exp": 7955112142,
"first_name": "Test",
"iat": 1656293927,
"is_active": true,
"is_internal": true,
"is_org_admin": true,
"iss": "https://auth.redhat.com/auth/realms/EmployeeIDP",
"jti": "03f0bd7b-003f-43cc-a169-fc4a7a582655",
"last_name": "Test",
"locale": "en_us",
"nonce": "eb1485d6-8351-4494-978d-8b62bebe126b",
"org_id": "16155304",
"preferred_username": "[email protected]",
"realm_access": {
"roles": [
"authenticated",
"fleet-manager-admin-full",
"acs-general-engineering"
]
},
"scope": "openid iam.clients.service_accounts offline_access",
"session_state": "20873d12-aae8-4d3b-9c14-44a5a253c367",
"sid": "20873d12-aae8-4d3b-9c14-44a5a253c367",
"sub": "f:528d76ff-f708-43ed-8cd5-fe16f4fe0ce6:[email protected]",
"typ": "Bearer",
"type": "User",
"user_id": "12345678",
"username": "[email protected]"
}
1 change: 1 addition & 0 deletions docs/development/test-locally-static-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Show X.509: Yes
7. Copy the values of from Bitwarden's `ACS Fleet* Static token JWKS` item respectively, pasting them into the `VERIFY SIGNATURE` fields.
8. Copy the payload data contained within `config/static-token-payload.json` and adjust the payload to your liking.
9. Once finished copy the payload data and update the value within `config/static-token-payload.json`.
Use `config/static-token-admin-payload.json` for admin static token
10. Also, ensure that the ConfigMap `fleet-manager-authentication` is up-to-date, specifically the `jwks-file-static.json` item.

If you have re-created the JWKS files, ensure that fleet manager is re-started with the new values of the `config/jwks-file-static.json`.
Expand Down
4 changes: 2 additions & 2 deletions templates/service-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ objects:
}
]
}
jwks-file-static.json: |
jwks-file-static.json: | # pragma: allowlist secret
{
"keys": [
{
Expand Down Expand Up @@ -586,7 +586,7 @@ objects:
"use": "sig",
"kid": "acs-dev-bitwarden-static-token-jwks",
"alg": "RS256",
"n": "s6bi3xECYj1V_QksbRme4wRMm9X8NoCPqqYRqn3PGTYSpNpTsvOohSd2b3gtbtR_89N1YXFYbjMmk-dqaaZNGCVfg45KuCjaore62yiExAzMA8N-gw6IiBXe6TUN6kZP84OLDhfDZXmrpL1tOepWY1mSAN3IT_lmDFqU06MS7AXOTz7qWXOp6s_-Bwbl3GmP6OhAdc955-WAizTxiWdKWGZ0aXlhP167GE45IRjVarB_TIemDYfN1PBfznfgW7F4JZvwzC--oiH2mps8xaDvby7Y0W-LHFL_64lXgTs1OW9vcIisSH-1YsiVIraQDbiVtNTjzDrF7ouNKSL5uTQ2pQ"
"n": "sOxtMpVCVOUu0eX-yJ6PTv4yTTunZFQDvkbR4DM5XJ4nwyPYZpCFu9CnHbmnyUm6TVAbaESYGz8FR4ljb9QsEJMox1SMX_2_q2vNGh_l3_3OHsvJSgtW0fZb-V9nXm40iYbZlvHEqZuhkfKbd6mKtWq6Lz5tV-Y5WgAbxkMAe240MT9XxBdNn-uiwrGuQFYbl3628ECpG6XF7NAuhytaypgddSy4j0Md98tqg1pjT8jPGl-iBKJpv9zMPv-b78ZwrRn_4EDWlc3CqyzuTvu1sW_FnqvPPfMfyuxkk2iSrVFad1bqk23A3oALWWingJdIkD03gmGTFcd9h9s0_XfeJQ"
}
]
}
Expand Down
Loading