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

Fix accessing credentials when authorize project is enabled #922

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kneirinck
Copy link

When using the authorize-project plugin and restricting a job to run as a specific user, rtUpload fails to retrieve the stored credentials.
This happens for both a globally defined server as well as a locally defined server with rtServer.

After quite a bit of digging I found out that it's related to not using the Run context to access/find credentials.
This PR changes the credential retrieval in as many places as possible to use a Run context if available and applicable.

It's inspired by jenkinsci/docker-commons-plugin#68 (review)
This fixes #247



Copy link

github-actions bot commented Feb 14, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@kneirinck
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Feb 14, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Feb 14, 2024
@kneirinck kneirinck force-pushed the feature/access_credentials_when_authorize_project_is_enabled branch from 62f18a3 to 5a9aedc Compare February 14, 2024 14:31
@kneirinck
Copy link
Author

@yahavi could you re-add the safe to test label? Seems it got removed because of my (force) push

@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Feb 19, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credentials cannot be retrieved when authorize-project plugin is enabled
2 participants