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

CAS 2.0 Support #4497

Merged
merged 12 commits into from
Sep 30, 2016
Merged

CAS 2.0 Support #4497

merged 12 commits into from
Sep 30, 2016

Conversation

konsumate
Copy link
Contributor

@RocketChat/core

Closes #2325 #2326 #2963

CAS 2.0 Support
The CAS 2.0 protocol allows that the CAS SSO server transmits user attributes towards a CAS client, the RocketChat instance. RocketChat user attributes such as name, email and rooms (to join on default) can be sourced/generated from the external attributes. This is done by defining a JSON attribute map where the values may container external attribute placeholders which will be interpolated and assigned to internal user attributes.

Adds the following Settings to the CAS configuration:

Always sync User data
Always synchronize external CAS User data into available attributes upon login. Note: Attributes are always synced upon account creation anyway.)

Attribute map
Use this JSON input to build internal attributes (key) from external attributes (value). External attribute names enclosed with '%' will interpolated in value strings.
Example, {"email":"%email%", "name":"%firstname%, %lastname%"}

The attribute map is always interpolated. In CAS 1.0 only the username attribute is available. Available internal attributes are: username, name, email, rooms; rooms is a comma separated list of rooms to join upon user creation e.g: {"rooms": "%team%,%department%"} would join CAS users on creation to their team and department channel.

@konsumate konsumate closed this Sep 30, 2016
@konsumate konsumate reopened this Sep 30, 2016
@madhusudan
Copy link

Custom attributes not working!.
I tried with {"mail":"%username%@example.com", "name":"%username%"} with both CAS 1 and 2, but only username is coming correct but the email field is blank!!
I am using

Rocket chat version:0.49.3 (without docker)
Jasig Central Authentication Service 4.0.0

Any guess how to fix..?

@konsumate
Copy link
Contributor Author

Hey there,

Only the following internal attributes are beeing sourced from external attributes:

  • email
  • name
  • username
  • rooms

You have however tried sourcing "mail" instead of "email" - try the following syntax:
{"email":"%username%@example.com", "name":"%username%"}

Keep in mind that CAS attributes do only work with a CAS 2.0 enabled server.

@madhusudan
Copy link

@CoreCache
Thanks, its working now.. :-) 👍

@konsumate
Copy link
Contributor Author

You are welcome, just please be cautios about your conclusions next time, Thanks! :)

Custom attributes not working!.

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

Successfully merging this pull request may close these issues.

CAS Plugin: Upgrade cas libs to support CAS 2.0 protocol
4 participants