Alternative auth design for self-hosted shields #8581
Replies: 1 comment 2 replies
-
Thanks for reaching out, and for the kind words! There's a lot to process here but fundamentally I think you have two questions/suggestions. The first was this (in the context of OIDC/SAML) 👇
and I think the shortest answer is "no". Shields is an open source project maintained by an increasingly small number of volunteers in their spare time. Our efforts, along with the codebase, are primarily centered around the deployment/hosting of the free Shields.io service that's used extensively across the global developer ecosystem. We do of course strive to make it feasible, and hopefully straightforward, for folks to host their own badge server, but we've historically rejected requests that were only relevant in self-hosted contexts/had no utility (and often associated complexity) in the core shields.io context. In my view that posture is directly applicable here. While I understand the contexts and constraints you are working with, it does feel like a more niche self-hosting scenario, and it's most definitely not applicable to the shields.io context. As such I can't see how this would make sense for us to take on. Your other suggestion of allowing multiple credential sets to be specified is a potentially viable approach, certainly more than the other. 👇
This is actually one we've discussed in the past, especially in the context of badges/services where a list of |
Beta Was this translation helpful? Give feedback.
-
Hi all! 👋
First off, thank you for the shields project! Our company uses shields internally as a self-hosted instance due to operating in an air-gapped environment and it's extremely helpful to build our badges for our internal CI and related services. That said, I have a predicament that I'd like to bring up to the community here.
One challenge we have is most of our systems that we are looking to generate badges for require authentication. Normally, this isn't a problem for shields since there is the concept of server secrets and the associated auth helper. However, we don't have any mechanism of handling multiple sets of credentials or tokens for a single type of badge. For example, I run many internal Maven repositories that are all privately secured. Alternatives are running individual shields instances per team/customer/"tenant", which isn't ideal. My intention is to run a single set of shields instances that can handle badges for all our internal development teams and thought it would be useful to have some sort of "auth delegation" to self-hosted shields.
My original idea was to extend the existing server secret model and allow selectable credentials to be used. Putting aside the authorization question of who is allowed to use a credential if it were made to be a drop-down, this made me think that maybe a better model would be to build in support for something like OIDC or SAML so that an individual user's access can be reused by shields and we could use a standard auth code OAuth flow. Of course, the systems I'm dealing with do not all support the newer authentication methods so I'm stuck with manual auth via LDAP, username+password, API tokens, etc.
This is my long-winded way of asking - Is this a useful enough feature for anyone else to use upstream or is there better alternative solutions we can use with the existing project? What my idea may look like:
Alternatives considered:
Just wondering if anyone else has experience in this area and can sanity check. I'm leaning towards either allowing tokens to be specified by users (bad), have a shields self-hosted instance accept multiple credential sets (better but still insecure because anyone can request to use another group's creds) or requiring our devs to run their own instance with their own server secrets (not ideal but minimal/no code changes needed to shields to support this)
Beta Was this translation helpful? Give feedback.
All reactions