Skip to content
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

Improve error reporting in dev mode #13

Open
handnot2 opened this issue Feb 24, 2018 · 13 comments
Open

Improve error reporting in dev mode #13

handnot2 opened this issue Feb 24, 2018 · 13 comments

Comments

@handnot2
Copy link
Owner

No description provided.

@daxhuiberts
Copy link

I'm trying to get OneLogin SAML authentication to work with the samly howto app. I got the flow from SP -> idP -> SP working and see a SAML AuthN Request and a SAML Response data in SAML tracer, but the consume endpoint responds with a 403 error without any more details.

What is the best way to debug this further in its current state?

@dereksweet
Copy link

I am having the same issue. 403 from consume endpoint, no information as to why.

@handnot2
Copy link
Owner Author

handnot2 commented Mar 1, 2019

What is the error/reason you see in the browser window? You will find something like: "access_denied ".

{:error, reason} -> conn |> send_resp(403, "access_denied #{inspect(reason)}")

Check to make sure that the base_url and entity_id are setup correct in the identity_providers config setting. If base_url is not setup correct you might see bad_recipient. Check entity_id if you get bad_audience.

@dereksweet
Copy link

dereksweet commented Mar 1, 2019

I did get it working eventually. I did go through bad_assertion and bad_recipient errors but eventually got it all figure out. The only way I was able to get there, though, was by editing my local copy of the samly code and recompiling it and spitting out error messages to the logs. It would be great if there was a debug mode that could be turned on that would output some extra lines to the log when things fail. But it's wokring great now! THanks for the awesome tool. Appreciate it

@handnot2
Copy link
Owner Author

Adding the following as a reference:

Common Errors

access_denied {:error, :bad_recipient} - Check the base_url in your Samly
config setting under indentity_providers.

access_denied {:error, :bad_audience} - Make sure that the entity_id in
the Samly config setting is correct.

access_denied {:envelope, {:error, :cert_no_accepted}} - Make sure the
Identity Provider metadata XML file you are using in the Samly config setting
is correct and corresponds to the IdP you are attempting to talk to. You get
this error if the certificate used by the IdP to sign the SAML responses
has changed and you don't have the updated IdP metadata XML file on the Samly end.

@cmatheson
Copy link

i'm getting the :bad_recipient error, but i don't have a base_url configured for samly (i'm letting it derive the base_url). Is there any way to get more details about what is going wrong?

@cmatheson
Copy link

it seems that the functionality that derives base_url is broken (or the documentation is wrong). Explicitely setting base_url to https://example.com/sso fixed it for me.

@daya
Copy link

daya commented Jan 9, 2020

Any solution to this problem of access_denied :bad_assertion from consume endpoint? Its very frustrating to not have any debug info.

BTW, RelayState is being passed and matches on both side, so what gives?

@daya
Copy link

daya commented Jan 9, 2020

@dereksweet what did u do to get it working ?

@dereksweet
Copy link

dereksweet commented Jan 9, 2020

@dereksweet what did u do to get it working ?

@daya It's been a while and we have long since abandoned our SAML integration and used a third party solution instead. However, if I remember correctly it was just a configuration issue that once I forked the code and put in my own debugging messages through the Samly code I was able to quickly decipher which config setting was not correct.

@daya
Copy link

daya commented Jan 9, 2020

Any solution to this problem of access_denied :bad_assertion from consume endpoint? Its very frustrating to not have any debug info.

BTW, RelayState is being passed and matches on both side, so what gives?

@handnot2 any insights into this? for an elixir n00b what kind of debugging tools should I use to figure out why access_denied :bad_assertion is returned.

@sheharyarn
Copy link

sheharyarn commented Mar 28, 2020

Bump, anyone else find how to debug this? Also getting the same access_denied :bad_recipient error.

@manzanit0
Copy link

Referencing an example of working configuration for OneLogin as an identity provider, in case somebody finds it useful: #52 (comment)

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

No branches or pull requests

7 participants