nextcloud / nextcloud/user_saml
Error with AssertionConsumerServiceURL using OAuth0
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 104
- Forks
- 85
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 16
Description
Hi, I'm trying to setup nextcloud using auth0 as Identity Provider.
The plugin correctly redirects me to the external login page but then an generic error from oauth0 is displayed. In the oauth0 logs it says:
"error": {
"message": "The SAML Request AssertionConsumerServiceURL is invalid: 'http://my-nextcloud-domain/apps/user_saml/saml/acs'",
"oauthError": "invalid_request",
"type": "request-error"
}
I inspected the redirects that the browser does when loggin in and indeed the SAMLRequest that nextcloud passes in the assertion service url w/o https. Whole SAMLRequest:
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="ONELOGIN_edc7929f6bf546831d8b2bce06b64bc9a3ccec0d"
Version="2.0"
IssueInstant="2019-07-11T15:23:32Z"
Destination="-omitted-"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AssertionConsumerServiceURL="http://my-nextcloud-domain/apps/user_saml/saml/acs">
<saml:Issuer>http://my-nextcloud-domain/apps/user_saml/saml/metadata</saml:Issuer>
<samlp:NameIDPolicy
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
AllowCreate="true" />
</samlp:AuthnRequest>
My suspicion is that as the nextcloud is behind an reverse proxy (nginx) it does not use https altough it is.
Can you shed some light?
Btw I followed this guide: https://medium.com/@mathiasconradt/nextcloud-single-sign-on-with-auth0-a546cdf1fccf
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the reverse-proxy HTTPS forwarding and the generated SAML AuthnRequest, focusing on the /apps/user_saml/saml/acs entry point and its AssertionConsumerServiceURL. Compare the externally configured URL with the request shown in the issue and the linked Auth0 guide; done means the request uses the HTTPS ACS URL and Auth0 accepts the login.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100