-
Notifications
You must be signed in to change notification settings - Fork 3
AAP-55571 Refresh access_token #136
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
Open
justinc1
wants to merge
5
commits into
main
Choose a base branch
from
refresh-token
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
6254bfe to
5130d2c
Compare
5130d2c to
d31cd17
Compare
afad504 to
1c7b10d
Compare
Member
|
@justinc1 Do we have an issue tracking the need to update the docs? |
Contributor
Author
kcagran
approved these changes
Oct 28, 2025
Requires client_id and client_secret. Signed-off-by: Justin Cinkelj <[email protected]> # Conflicts: # clusters.example.yaml # src/backend/apps/clusters/models.py
Signed-off-by: Justin Cinkelj <[email protected]>
It allows checking token values. Signed-off-by: Justin Cinkelj <[email protected]>
Signed-off-by: Justin Cinkelj <[email protected]>
The value depends on encryption key. Signed-off-by: Justin Cinkelj <[email protected]>
1c7b10d to
a349e4b
Compare
Contributor
|
@justinc1 could you rebase this branch on top of main? Thank you! :) |
Contributor
|
cursor review |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR uses refresh_token to obtain a new access token when access token for AAP expires. The
clusters.yamlfile needs to be contain in addition to access_token also refresh_token, client_id and client_secret.The PR will store OAuth2
client_secretandrefresh_tokento DB (in addition to existingaccess_token). All three are encrypted.The API endpoint for token refresh changes from AAP 2.5 to 2.6. AAP version detection uses ping endpoint to detect version. The ping endpoint does not require authentication.
A helper command
getclustersis added. It is a debugging aid, it dumps token to screen in plaintext.To test this:
in clusters.yml set access_token to invalid value
run
python manage.py setclusters <path to yaml file>run
python manage.py run_dispatcherrun
python manage.py syncdata --since 2025-09-10 --until 2025-09-11now
run_dispatchershows:run
podman exec -it automation-dashboard-web /venv/bin/python ./manage.py getclusters --decrypt, it will show you your new access and refresh token.I did test this with AAP 2.4 and with AAP 2.6.
Documentation update is needed.