Ben Nicholas
posted this on October 05, 2010 10:59
This document should begin the conversation about moving to a User Authentication setup within your Community. Attached is a Visio diagram with notes that describe the process flow of both of our External Authentication methods (Direct and Silent). A Visio viewer can be obtained free from Microsoft at the following link:
Note: This document describes a Connect Enterprise Edition feature that can be enabled and configured within your Enterprise Edition Community. To configure User Authentications within your Community you will need to log in as a Community Manager and navigate to Community Tools > Settings > User Authentications.
We have two distinct External User Authentication (EA) methods... Silent and Direct. Both integrations can use a web form HTML based system or a Web Service that accepts HTTP POST. Information sent is formatted exactly as if it were submitted by any common form found on the Internet ("application/x-www-form-urlencoded"). Information received is 'parsed' from the response that is returned from that request. Regular Expressions are used to parse the individual response fields and can be defined by a Community Manager within the Connect Community Settings UI.
Using Silent Authentication will allow you to bypass the Centercode Connect Log-in screen altogether, and instead provide one of your own. This shifts ownership of the affected accounts and their credentials to your central system. If your system deems a user to have "beta" access then it may present a link or automatically redirect the user to the beta system. That redirection would be made to a specific page on the Connect site and will reference a one time use access key that your system provides as well as a reference path representing the location within Connect that the end user should wind up on after successful entry. Connect will verify that the key is valid by making an HTTP post to your system behind the scenes. That behind the scenes check of the key expects the user's User Name, Email, First Name, Last Name and whether or not the user can be granted access. If that information is returned, and if they are deemed to have access they will enter the system from that point just as they do after log-in today. From the end user's perspective, if they have the appropriate access, this happens quite invisibly.
Once a Silent EA is in place, Connect can be configured to redirect users from the local Connect log-in page to your log-in page including a return path and, if appropriate, a message key (for example: "Session_Expired"), entirely bypassing the local Connect log-in system.
End-User Process:
User Logs In:
User to be sent to Connect Silent Authentication Gateway:
Connect Processes Login Request:
- If valid, User enters Connect.
- If invalid, User is sent back to your Login page with the appropriate 'Msg' Message.
What you will need to do on your side:
- This page needs to accept and remember the "Ref" parameter. This parameter will need to be repeated back to Connect (/loginsa.html) when the User is sent back.
- This page needs to accept and act on the following MSG parameters:
Session_Expired - This message can be triggered from anywhere within Connect, and indicates that the end user's Connect session has timed out.
Session_Expired_Overload - This message can be triggered from anywhere within Connect, and indicates that the end user's Connect session was release due to the server being too busy. This message can also be triggered while the Connect server is being taken offline for an update.
Logged_Out - The end user opted to log out of the Connect application. This was done by clicking on the 'Log Out Now' link or by choosing to log out from the 'Your Session Is About To Expire' message.
EAS_MISSING_KEY - This message was raised by the Silent Authentication Gateway (/loginsa.html). The Authorization Key is missing or is invalid.
EAS_MISSING - This message was raised by the Silent Authentication Gateway (/loginsa.html). This is a configuration error that inicates that there were no EA servers defined.
EAS_NO_NEW_TEAMS - This message was raised by the Silent Authentication Gateway (/loginsa.html). This is a configuration error that inicates that New User's default teams were not defined.
EAS_NO_USER - This message was raised by the Silent Authentication Gateway (/loginsa.html). The User was Authorized by your system, but the user was not identified by your system.
EAS_NO_AUTH - This message was raised by the Silent Authentication Gateway (/loginsa.html). This message indicates that the User was not authorized by your system.
EAS_NO_AUTH_NO_USER - This message was raised by the Silent Authentication Gateway (/loginsa.html). This User was Not Authorized and was not identified by by your system.
EAS_USER_ERROR_NOT_UNIQUE_USERNAME - This message was raised because your Implementation already has a user account that uses the provided Username. Username must be unique.
EAS_USER_ERROR_NOT_UNIQUE_EMAIL - This message was raised because your Implementation already has a user account that uses the provided E-mail address. In most cases E-mail Address must be unique.
EAS_ERROR_500 - This message was raised by the Silent Authentication Gateway (/loginsa.html). Your Authorization server returned an error (HTTP 500). This type of error generally indicates that your script resulted in a source code error.
EAS_ERROR_404 - This message was raised by the Silent Authentication Gateway (/loginsa.html). Your Authorization server was not found (HTTP 404/Page Not Found). This could be a configuration error.
EAS_ERROR_302 - This message was raised by the Silent Authentication Gateway (/loginsa.html). Your Authorization server attempted to redirect the connection that was used to consume the Key and gather information about the end user (HTTP 302/Redirected).
EAS_MISSING_DATA - This message was raised by the Silent Authentication Gateway (/loginsa.html). This is a configuration error that inicates your Authorization server was defined but it's Configuration is incomplete.
- Typically a GUID is used, but you can use an Encrypted and/or Hashed value. Connect will repeat this key back to you, so Encryption Keys will not need to be shared.
- This Key needs to be unique.
- This Key should not be easy to guess... you should not use incrementing numbers or patterned key generation.
- This Key needs to be invalidated once the End User uses it. This is important in order to prevent End Users from repeating the URL used when they are sent back to Connect.
- This key should expire after a short ammount of time. Connect will 'Consume' the key immediately after the user is sent back.
- Connect will send the Key back as a Querystring (GET) parameter using the same name. Your system will need to gather User information and invalidate this key.
- This interface will need to respond as if writing text to an End User's screen. This response will need to include whether or not the Key is valid, User's Username, Email, First and Last Name as defined for your 'User Authentication' configuration.
Security Considerations: It is very important that special care be taken to ensure the return links are not repeatable. If a returned key can be used more than once then it can very easily be bookmarked and shared. SSL should be required for all context changes between systems and wherever user credentials or used information is passed.
Major Benefits of Silent EA
Drawbacks of Silent EA
Using Direct Authentication end user credentials can be provided directly to Connect as if users were logging in with a local Connect user account. Connect will look first for a matching local user account, and if appropriate will relay the user's credentials to your site for approval. In response to that approval request Connect expects back the user's First Name, Last Name, Email and User Name, along with whether or not they have access to the system. If that information is returned and they are determined to have access to the system, the user is allowed to enter the site.
End-User Process:
User Logs In:
Connect Processes Login Request:
- If valid, User enters Connect.
- If invalid, User is sent back to Connect Login screen with the appropriate message.
What you will need to do on your side:
- Connect will send the credentials as a Form Post (HTTP POST).
- Your system will need to respond as if writing text to an End User's screen. This response will need to include whether or not the credentials are valid, User's Username, Email, First and Last Name as defined for your 'User Authentication' configuration.
Security Considerations: User credentials passed between systems can and should be encrypted. SSL should be used for all connections that are made between systems. With the Direct Authentication method, user credentials are provided to the Connect implementation and then relayed to the external system, however Connect never stores a plain text copy of the user's password.
Major Benefits of Direct EA
Drawbacks of Direct EA
In general both EA methods allow you to present a more unified experience to your end users, across many systems that you may provide. Some processes may need to be adjusted when shifting from using local Connect user accounts to using an EA. For example, if you use multiple Sign-Ups in Connect, you will need to use multiple EA configurations instead. Sign-Ups are tools within Connect to create Connect User Accounts. After moving to an EA system Connect may no longer be responsible for the creation of those accounts. Other user management processes will need to be thought through before implementing a change on this scale.
Major Benefits of Both EA Methods
Drawbacks to Both EA Methods
Note: It is very important when planning these integrations to ensure the systems match on a value that is consistent -- or if linked information is changed at the source Centercode Web Services are called to reflect the change on the Centercode side.