Skip to content

Fix accessing credentials when authorize project is enabled#922

Open
kneirinck wants to merge 4 commits intojfrog:masterfrom
kneirinck:feature/access_credentials_when_authorize_project_is_enabled
Open

Fix accessing credentials when authorize project is enabled#922
kneirinck wants to merge 4 commits intojfrog:masterfrom
kneirinck:feature/access_credentials_when_authorize_project_is_enabled

Conversation

@kneirinck
Copy link
Copy Markdown

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



@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 14, 2024

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

@kneirinck
Copy link
Copy Markdown
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
Copy Markdown
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