snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Unable to get SAML to work with Google Workspace.

Open drj-io opened this issue 4 years ago • 16 comments

Debug mode

Describe the bug

I'm unable to get SAML to work with Snipe and Google Workspace.

Reproduction steps

Add the SAML app to Snipe according to instruction here: https://snipe-it.readme.io/docs/saml

Expected behavior

Integration should work. We get Error: app_not_configured_for_user

Screenshots

image

image

image

image

Snipe-IT Version

Hosted version 6.0.8 Build 8409 (master)

Operating System

Hosted by Snipe

Web Server

Hosted by Snipe

PHP Version

Hosted by snipe

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

Error: app_not_configured_for_user

Additional context

Is there something that we need to add for Attribute mappings? If so I didn't see that in the documentation. Thank you!

drj-io avatar Jul 25 '22 21:07 drj-io

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Jul 25 '22 21:07 welcome[bot]

That sounds like a setting issue on the Google side. @uberbrady can you confirm?

snipe avatar Jul 25 '22 21:07 snipe

Thanks, it seems to me like a possible mapping issue. The user's username & email match in Snipe. And the instructions for Snipe's Google Workspace configuration specify that no mappings are needed. I'm wondering if a mapping on Google's side needs to be set up to match what Snipe is sending.

The's are the docs we're referencing: https://snipe-it.readme.io/docs/saml

Snipe-IT Documentation
Configuration guidelines for SAML Single-Sign On (SSO) support

drj-io avatar Jul 25 '22 21:07 drj-io

One thing of note: Attribute Mapping on the Snipe side is set to blank. The field comment says "NameID will be used if attribute mapping is unspecified or invalid."

Is NameID the correct attribute that should be mapped? Shouldn't this be an email attribute?

Per docs: Google only will allow you to authenticate via full email address, not "short usernames".

drj-io avatar Jul 25 '22 21:07 drj-io

app_not_configured_for_user I believe means you didn't enable the App (on the google side) for all of your users.

Check out https://snipe-it.readme.io/docs/saml#google-as-saml-identity-provider and look for the part that says "Then, make sure to enable your Google SAML App for all users in your organization" - there's a button you can click that will enable the 'app' for all users in your Google organization.

Snipe-IT Documentation
Configuration guidelines for SAML Single-Sign On (SSO) support

uberbrady avatar Jul 25 '22 22:07 uberbrady

The app is configured and enabled as the screenshots show.

Today I'm getting a 500 error from Google.

image

Progress?

drj-io avatar Jul 26 '22 12:07 drj-io

I would love to confirm with someone the SAML attribute mapping and configuration settings on the Google side.

The docs specify that no attribute mapping is needed in Google: image

Here are the service provider settings once again in google: image

Here are the settings in snipe: image

I've gone over the instructions several times to confirm, though it seems some of the information has changed since it was written on the Google side. I would love to confirm the settings from someone that has this working with the hosted Snipe capability.

Thanks for looking!

drj-io avatar Jul 26 '22 15:07 drj-io

Encountered the same problem. I tried attribute matching but that didn't seem to make a difference.

Snipe-IT: Screen Shot 2022-09-07 at 9 35 41 AM

Google: Screen Shot 2022-09-07 at 9 36 00 AM

alanivey avatar Sep 07 '22 13:09 alanivey

@alanivey We actually got this working. Our Attribute Mapping field is blank and there are no fields mapped in the GW configuration.

Best of luck!

drj-io avatar Sep 07 '22 13:09 drj-io

@drj-io that's encouraging to hear. I've tried with and without the mapping, and I just removed it now again based on your reply. What ended up being the solution for you? Does it just take a while for Google to enable the app for everyone?

alanivey avatar Sep 07 '22 14:09 alanivey

@alanivey docs say up to 24 hours, though it seemed like it too longer for us. I was not the one that finished the integration, so that's all the info I have.

I'm going to go ahead and close this issue given that our case is fixed. Cheers!

drj-io avatar Sep 07 '22 14:09 drj-io

I am having exactly the same issue... I will wait for another 24h and try again...

oussjarrousse avatar Feb 05 '23 13:02 oussjarrousse

@alanivey was the issue resolved for you? could you share any insights into this issue? or do you recommend that we just wait? Thanks

oussjarrousse avatar Feb 05 '23 13:02 oussjarrousse

I think I know what the issue is/was... SAML won't work for users created on SnipeIT if the users didn't login using the username and password first. In other words... login for the first time with username and password, the next times, use SAML.

oussjarrousse avatar Feb 05 '23 14:02 oussjarrousse

@oussjarrousse that's not the case, at least not for my users. Our profile data is synced from LDAP and their first login is done using SAML.

I think there's an additional step with Google now. My SAML configuration was working fine until the 6.1.0 update, though it could just be coincidence since the the change needs to be made in the Google Workspace admin settings.

You need to change the "Name ID format" field from "UNSPECIFIED" to "EMAIL". I also suggested this as an edit in the Snipe-IT SAML docs including this additional step. Hope this helps. Screenshot 2023-04-16 at 12 02 55 PM

chndler avatar Apr 16 '23 19:04 chndler

I think I know what the issue is/was... SAML won't work for users created on SnipeIT if the users didn't login using the username and password first. In other words... login for the first time with username and password, the next times, use SAML.

@oussjarrousse thank you!!!! It was several days I was trying every possible configuration and blamed it on something related to Google. Then I logged in with the password, user is local to Snipe-It, and it worked perfect! So definitely you need a user/password login for local users before using them with SAML

LoZio avatar Sep 07 '23 11:09 LoZio