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

Able to login using normal login form with AAD SSO configured

Open samotelf opened this issue 3 years ago • 7 comments

Debug mode

Describe the bug

I've managed to configure AAD SSO with Snipe-IT, and when in the browser I insert the snipe-it url the AAD SSO screen appears as it should. So far, so good, however, I think it's strange that when I logout (from the user top right menu) I'm able to login using the normal Login form, even with the option Make SAML the primary login (You can use '/login?nosaml' to get to the normal login page.) checked. I don't think this is normal behavior. As per documentation it says:

"SAML Force Login When this checkbox is enabled, you will not see a login form of Snipe-IT anymore when you go to the Snipe-IT website. Instead it will redirect you directly to the IdP SAML Login." and this is true, but imho it should also be true when you logout.

Any insights on this?

Thank you very much.

Reproduction steps

  1. Login in Snipe-IT using the Microsoft SSO (since it's configured with Azure).
  2. Logout from the user option in the top right corner.
  3. Being able to login using the normal Login Form. ...

Expected behavior

Not being able to login using the normal Login Form. In my opinion, the user shouldnt be able to login using the normal Login Form, or at least if he tries to do so, get an error/link to login via SSO again.

Screenshots

No response

Snipe-IT Version

6.0.9

Operating System

CentOS 7

Web Server

Apache

PHP Version

7.4.30

Operating System

Windows

Browser

Chrome

Version

101.0.4951.64

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

samotelf avatar Aug 12 '22 07:08 samotelf

Update: If in the .env file there's the line "REQUIRE_SAML=true" I can only in fact login only with SAML, but unfortunately using https://assets.example.com/login?nosaml (this is useful in case SSO is down) won't let me login using the normal login form.

samotelf avatar Aug 12 '22 08:08 samotelf

Well yeah, that's the point tho. REQUIRE_SAML=true literally disables any ability to login using the regular web UI, even with the /login?nosaml parameter.

snipe avatar Aug 23 '22 01:08 snipe

Well yeah, that's the point tho. REQUIRE_SAML=true literally disables any ability to login using the regular web UI, even with the /login?nosaml parameter.

Hello. Didn't know that. I was just going by trial and error, I'll take that line out and wait for feedback. Thank you.

samotelf avatar Aug 23 '22 14:08 samotelf

Yeah, we actually allow our hosted customers do have that setting enabled, but we discourage it because it's hard for us to log in with our own user to look at their instance when they need us to.

Regardless, if it turns out that things are working as expected and your users are happy, please do close the issue once if they let you know that the system is working OK. Thanks!

uberbrady avatar Aug 25 '22 00:08 uberbrady

Yeah, for hosted customers, if we enable that flag, we explain that our ability to provide support will be limited unless they want to create a user for us in their SAML provider (which a few have done.)

snipe avatar Aug 25 '22 00:08 snipe

Ok, I really don’t know what to say. If it’s supposed for the user login using the login form after logout when SAML is configured, I guess you could close the ticket. :) thank you all.

samotelf avatar Aug 27 '22 12:08 samotelf

I still think this is an issue.

When I enabled 'Make SAML the primary login' I'm always presented with the normal username/password login form with the little link undereath to login with SAML.

I would expect that I don't get the username/password login box at all.

chais0n avatar May 02 '23 09:05 chais0n