-
Notifications
You must be signed in to change notification settings - Fork 26
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
Prevent Public Resource Creation #233
base: master
Are you sure you want to change the base?
Conversation
@Lomilar My initial stab is to just add a middleware block between the auth and skyrepo steps, but this ends up snagging internal user creation requests made by the auth step -- calling the global EcRepository instance when it detects a new user login. https://github.com/cassproject/CASS/blob/master/src/main/server/shims/auth.js#L111 Currently the EcRepository seems to route its requests into the same Open to alternatives also. |
There is a missing authentication method, which is the only real method, which is via signature sheets (can be present in headers or in a POST). I'd really look at injecting something like this into the signature sheet validation checks, since all OIDC/PKI (client side certs)/JWT based authentication ultimately results in a signature sheet proxy so that data modifications have the correct fingerprints. CASS/src/main/server/skyRepo.js Line 150 in bf3be75
To see where this translation occurs, look at This puts shims in to convert authentication of all sorts into signature sheets, something we call a "securing proxy". To put it explicitly:
|
That was the first try, but could've sworn I was still logging empty sheets when the user was logged in. Will try that next then. |
That may be -- gets and whatnot don't have signature sheets necessarily, but let's ram our faces into that roadblock and find a way through. I think the intent is to provide something a bit more useful and nuanced than border security, which anyone deploying cass could put in. |
So I tried a few different approaches based on your initial suggestion.
|
About there, looking for a way to confirm that the new object created with the auth handler was creating using the internal
Namely, this modified part of the
My thought atm is that |
@Lomilar looking through the new user object and the signature workflow, I'm not seeing a way to verify the first-time user's
Is there any other way to verify the authenticity of this initial Create Person job? |
It looks like there's an edit: looks like that did the trick -- may have unintended consequenes though if it's expecting to always use the default EcIdentityManager instance? |
Will be testing this on a live instance today to see if anything weird comes up. |
So after a day or so and adjusting the changes to be a bit more precise, it seems to be behaving without any issues:
@Lomilar for the UI portion, the least invasive option might be exposing some sort of We're a bit pressed this week but I will work the UI side of this PR if the |
Merging 1.5.14 Release
Making the No-Public aligned with main
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
From #226
The goal of this change is to allow server admins to prevent public creation of competencies, frameworks, etc. by requiring that those requests be associated with a logged-in user and presumably leave that enforcement to an OIDC provider.
Security Impact: This will hopefully harden CASS against fuzz attackers.
Presumptive Impact: Servers configured this way will require a slightly modified UI that will understand when their respective instance requires authorized users and disable their "Add New __" widgets when necessary. These changes aren't included here and will be added later.