Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Please help me ! #14

Open
dat-trinhtien opened this issue Sep 4, 2014 · 3 comments
Open

Please help me ! #14

dat-trinhtien opened this issue Sep 4, 2014 · 3 comments

Comments

@dat-trinhtien
Copy link

User was authenticated but could not be created automatically in Redmine. It must be added manually.

how can i config Attributes mapping, I use CAS server auth with Active Directory

This is my config : login=sAMAccountName&firstname=givenName&lastname=sN&mail=mail

but error : User was authenticated but could not be created automatically in Redmine. It must be added manually.

and error log in production.log is : Could not auto-create user: First name can't be blank, Last name can't be blank, and Email can't be blank

i think CAS server reponse empty argument.

Please help me !!

@calmyournerves
Copy link
Contributor

Hey @goonux, Redmine requires first name, last name, and email address to create a user. You'll need to ensure those attributes are in the CAS response.

@Poil
Copy link

Poil commented Nov 1, 2014

Hi,

I've this exposed (tested with phpCAS) :
mail: [email protected]
first_name: Benjamin
cn: Benjamin XXXXX
last_name: XXXXX

I've tried this configuration: firstname=first_name&lastname=last_name&mail=mail
but when I log-in I've "xxxxx was authenticated but could not be created automatically in Redmine. It must be added manually"

Any idea ?

Hum I've dump the session, no attribute :

{"session_id"=>"36dfced6f980xxb8a17202xxd69423c0", "cas_sent_to_gateway"=>false, "cas_validation_retry_count"=>0, "previous_redirect_to_cas"=>2014-11-01 09:28:14 +0100, "cas_user"=>"xxxxxxx", "cas_extra_attributes"=>{}, "casfilteruser"=>"xxxxx", "cas_last_valid_ticket"=>"ST-461-cOgwwfDcBmPlRfKmgOdl.xxxxxxxxx.xxx.org", "cas_last_valid_ticket_service"=>"http://redmine.fr.xxxxxxx/cas?ref=%2F", "_csrf_token"=>"C7WoxxxxPDj2e21mxxxxxBvpkUXdgEaxxxxWbQIe6RQ="}

I thing your SSO client is not compatible with Jasig Style Attributes :

        // "Jasig Style" Attributes:
        //
        //  <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
        //      <cas:authenticationSuccess>
        //          <cas:user>jsmith</cas:user>
        //          <cas:attributes>
        //              <cas:attraStyle>RubyCAS</cas:attraStyle>
        //              <cas:surname>Smith</cas:surname>
        //              <cas:givenName>John</cas:givenName>
        //              <cas:memberOf>CN=Staff,OU=Groups,DC=example,DC=edu</cas:memberOf>
        //              <cas:memberOf>CN=Spanish Department,OU=Departments,OU=Groups,DC=example,DC=edu</cas:memberOf>
        //          </cas:attributes>
        //          <cas:proxyGrantingTicket>PGTIOU-84678-8a9d2sfa23casd</cas:proxyGrantingTicket>
        //      </cas:authenticationSuccess>
        //  </cas:serviceResponse>
        //

@robertauer
Copy link

I've got the same problem, is there a fix available?
I tried the configuration id=username&firstname=givenName&lastname=surname&mail=mail , but got the same error:
"user was authenticated but could not be created automatically in Redmine. It must be added manually." displayed and
"Could not auto-create user: Email cannot be blank, First name cannot be blank, and Last name cannot be blank" in the production.log.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants