Skip to content

Conversation

jmpesp
Copy link
Contributor

@jmpesp jmpesp commented Oct 7, 2025

Build on #8981 and add the SCIM user provision type to users and groups. Users must have a user name, and optionally have an external id field and/or an active field. Groups must have a display name and optionally have an external id field.

Also add a new SiloIdentityMode named SamlScim.

A few functions have to change to account for these new variants, but not many. Silos using the SamlScim identity mode will use all the same SAML code that exists today.

Build on oxidecomputer#8981 and add the SCIM user provision type to users and groups.
Users must have a user name, and optionally have an external id field
and/or an active field. Groups must have a display name and
optionally have an external id field.

Also add a new SiloIdentityMode named SamlScim.

A few functions have to change to account for these new variants, but
not many. Silos using the SamlScim identity mode will use all the same
SAML code that exists today.
@jmpesp jmpesp requested a review from hawkw October 7, 2025 13:46
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

I picked a lot of very minor nits, but overall, this seems fine and I have no major concerns!

Comment on lines 907 to 909
user_name TEXT,

active BOOL,
Copy link
Member

Choose a reason for hiding this comment

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

since these are SCIM-specific columns, perhaps the name ought to be scim_user_name and scim_active to make that super-duper extra clear? it's a bit uglier but it might make the code a bit easier to follow when you're reading through it in a context outside of reviewing this PR...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm hesitant to - in world where we support additional user types, there may be additional overlap in these fields, and they'll no longer be SCIM specific.

Copy link
Member

Choose a reason for hiding this comment

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

hmm, i guess i wonder if it's correct for such fields with overlapping meanings to be represented by the same columns, but i suppose we're already doing that with external_id a bit. 🤷‍♀️

Comment on lines 192 to 193
"/login/{}/saml/some-totally-real-saml-provider",
SILO_NAME
Copy link
Member

Choose a reason for hiding this comment

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

tiny style nit: could be

Suggested change
"/login/{}/saml/some-totally-real-saml-provider",
SILO_NAME
"/login/{SILO_NAME}/saml/some-totally-real-saml-provider",

although maybe that exceeds 80 characters, in which case 🤷‍♀️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, still under 80! 86f0064


let _silo_saml_idp: views::SamlIdentityProvider = object_create(
client,
&format!("/v1/system/identity-providers/saml?silo={}", SILO_NAME),
Copy link
Member

Choose a reason for hiding this comment

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

style nit: could be

Suggested change
&format!("/v1/system/identity-providers/saml?silo={}", SILO_NAME),
&format!("/v1/system/identity-providers/saml?silo={SILO_NAME}"),

Copy link
Contributor Author

Choose a reason for hiding this comment

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


let silo_saml_idp: views::SamlIdentityProvider = object_create(
client,
&format!("/v1/system/identity-providers/saml?silo={}", SILO_NAME),
Copy link
Member

Choose a reason for hiding this comment

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

tiny style nit: could be

Suggested change
&format!("/v1/system/identity-providers/saml?silo={}", SILO_NAME),
&format!("/v1/system/identity-providers/saml?silo={SILO_NAME}"),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.await;
let silo: Silo = NexusRequest::object_get(
&client,
&format!("/v1/system/silos/{}", SILO_NAME),
Copy link
Member

Choose a reason for hiding this comment

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

tiny style nit: could be

Suggested change
&format!("/v1/system/silos/{}", SILO_NAME),
&format!("/v1/system/silos/{SILO_NAME}"),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@hawkw hawkw 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 to me!

@jmpesp jmpesp merged commit dea2d6f into oxidecomputer:main Oct 8, 2025
17 checks passed
@jmpesp jmpesp deleted the scim_user_provision_type_and_idp branch October 8, 2025 22:17
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.

2 participants