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

allow/validate bitbucket_username / bitbucket_password in private config schema #8472

Merged
merged 2 commits into from Oct 8, 2022

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Oct 3, 2022

closes #8445

@chris48s chris48s added bug Bugs in badges and the frontend self-hosting Discussion, problems, features, and documentation related to self-hosting Shields labels Oct 3, 2022
@shields-ci
Copy link

shields-ci commented Oct 3, 2022

Warnings
⚠️ This PR modified the server but none of its tests.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against 774ba59

Copy link

@ferarias ferarias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a very mild case of paranoia because I feel like there was something we did intentionally once upon a time relative to Bitbucket cloud, but I can't find any supporting evidence and don't recall any specifics so I do not have a high level of confidence.

This seems like a simple and reasonable enough thing to do, so I'll chalk my paranoia up to a weird dream 🤷

@chris48s
Copy link
Member Author

chris48s commented Oct 8, 2022

I think its just oversight. The one thing I can think of where setting credentials for this could cause a problem would be if we weren't setting authorizedOrigins properly, but we're hard-coding an appropriate value in

this.bitbucketAuthHelper = new AuthHelper(
{
userKey: 'bitbucket_username',
passKey: 'bitbucket_password',
authorizedOrigins: ['https://bitbucket.org'],
},
config
)
so I am not worried about this.

I think in general, the BitBucket badges are a bit of a patchwork: Not all of them work with both BB server and BB cloud. Not all of them support auth if you have credentials set. There's definitely some tidy up needed, but I don't think this causes any problem.

@repo-ranger repo-ranger bot merged commit d78a2f4 into badges:master Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend self-hosting Discussion, problems, features, and documentation related to self-hosting Shields
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BITBUCKET_USER and BITBUCKET_PASS can't be passed as environment vars
4 participants