Page History
HTML |
---|
<style>
.wiki-content ul {
list-style-type: none;
}
</style> |
...
borderColor | #000000 |
---|---|
bgColor | white |
titleColor | white |
borderWidth | 1 |
titleBGColor | #000000 |
borderStyle | solid |
title | Introduction |
Updated January 31, 2020
Use this guide to work with the SecureAuth
...
IdP Identity Management APIs to leverage end
...
user profiles from the
...
configured data store, add and update profiles, and modify attributes in profiles. These tools enable
...
administrators to manage end
...
users programmatically from the website, without
...
building connections directly to the data store. A use case example is where an administrator uses the Identity Management APIs to access the data store for a self-service portal where end users can reset forgotten passwords, change expired passwords, and change knowledge-based answers and PINs.
Use API Identity Management tools with Authentication API features configured on the SecureAuth IdP realm
...
to securely direct end users through unique logins and interfaces without leaving the application.
...
borderColor | #444544 |
---|---|
bgColor | white |
titleColor | white |
borderWidth | 1 |
titleBGColor | #444544 |
borderStyle | solid |
title | Prerequisites |
...
Prerequisites
- Have access to the application code.
...
Have an on-premises Active Directory (AD) with which SecureAuth IdP can integrate.
UI Text Box title Note type info The Multi-Data Store option is not compatible with the Identity Management APIs
...
- Create a
...
- new realm or access an existing realm
...
- where the Identity Management APIs are enabled.
...
You can include the API in any realm with any
...
- post authentication event as long as you integrate the appropriate directory
...
- and configure the appropriate settings
...
- .
...
- Configure the Data tab in the SecureAuth IdP Web Admin
...
An Active Directory integration is required for SecureAuth IdP to pull user profile information during the login process
...
- .
The GET /user and update /user functions can work with non-AD integrations.
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
1. SecureAuth IdP Web Admin Steps 2. Configure Authorization Header & Response Header 3. Endpoints
|
...
Panel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
...
UI Text Box | ||
---|---|---|
| ||
Information about /users Endpoints and Group Association Endpoints are documented in the sections below |
...
borderColor | #145570 |
---|---|
bgColor | white |
titleColor | white |
borderWidth | 1 |
titleBGColor | #145570 |
borderStyle | solid |
title | Configure /users Endpoints |
...
...
Workflow
The following workflow guides you through the different SecureAuth IdP pieces necessary to configure the Identity Management APIs. Use the steps as a check list or move through the sections that follow in sequential order.
- Complete the SecureAuth IdP Web Admin configuration steps setup.
- Configure the Authorization Header & Response Header for all GET and POST requests.
- Configure /users endpoints and configure group association endpoints for users and groups.
...
SecureAuth IdP Web Admin configuration steps
Anchor | ||||
---|---|---|---|---|
|
Only API steps are required; all other Web Admin steps are optional and should be performed based on the features you want to implement.
Make the changes to the following sections in the appropriate SecureAuth IdP realm API tab.
API Key section
- In the API tab, go to the API Key section.
- Check Enable API for this realm.
- Click Generate Credentials to create a new Application ID and Application Key.
The Application ID and Application Key are unique for each realm.
The API key looks like it comprises 64 random characters, but it actually comprises 32 two-character base-16 hexadecimal values. This is important when using the API key to produce the HMAC hash. These values are required in the Header configuration steps you will perform later.
This is important to note when using the API key to produce the HMAC hash. - Click Select & Copy to copy the contents from the fields.
These values are required in the Header configuration steps you will perform later. - In the API Permissions section, check Enable Authentication API.
- Check at least one Identity Management tool to include in the API.
User management - add / update / retrieve users and their properties: Use this tool to add new user profiles, and to retrieve and update existing user profiles. Updating a user profile includes setting and clearing property values in the user profile.
If your team is using SecureAuth RADIUS 2.4.15 or later, you must check User Management. This setting enables the SecureAuth IdP API to connect to User properties.
Administrator initiated password reset: Use this tool to let an administrator send the end user a new password requested by using an application.
Use case: End users request a new password because they have forgotten the current one.
User self-service password change: Use this tool to let the end user input both the current password and a new password
Use case: With the Administrator initiated password reset option, end users enter the password sent by the administrator (the current password), and then enter a new password to perform the reset.
User & group association (LDAP): Use this tool to enable associations between existing users and groups within the LDAP data store. - Save the configuration.
Excerpt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Configure request header
Authentication against an API requires a configured HTTP basic authorization header and Content-Type header. 1. Add a Content-Type header with a value of application/json 2. Create an Authorization header for GET and POST requests using the steps below. Authorization request header
A. Build a string based on the request: A1. METHOD (GET) or METHOD (POST) A2. DATE/TIME
A3. APPLICATION ID (from the Identity Platform Web Admin – API Key section). A4. PATH (API endpoint). For example: /secureauth2/api/v3/users/{userID} B. Create an HMAC SHA256 hash of step 3 using the Application Key (from the Identity Platform Web Admin – API Key section). This step is executed by calling the HMAC and producing the hash value. C. Encode the HMAC SHA256 hash from step 3 in Base64. D. Concatenate the "Application ID", ":", and the "Base64 encoded HMAC SHA256 hash" from step 3: ApplicationID:Base64EncodedHMACSHA256Hash E. Encode the value from step 4 in Base64. F. Concatenate "Basic" and the "Value of Step 5": Basic Step5Value Authorization header GET / POST request examples
Authorization header non-validation response examples
3. OPTIONAL: If using the Email two-factor authentication method and a language other than US English, create an Accept-Language header to generate the Email OTP messages in the preferred language. If the no Accept-Language header is present, then the Email OTP messages default to US English. Configure response headerSecureAuth's API includes security hashing that ensures the integrity of the information being sent in all of the endpoints' responses from the appliance to the application. Through a hashing algorithm, SecureAuth IdP delivers a signature that can be validated by the application to ensure that no data manipulation has occurred prior to the application consuming the data. Before sending the response to the application (initiated by the endpoint request), SecureAuth IdP creates the signature and includes it in the response header (prepended by X-SA-SIGNATURE:). The application can then validate the response by hashing the date or time and content from the consumed response and the Application ID with the Application Key and compare the new hashed value with the X-SA-SIGNATURE value. The Application ID and Application Key are generated in SecureAuth IdP and connect the appliance with the application for each endpoint transaction. Application response headerIn the application's code, the following is required to validate the response header's signature.
After hashing the data, if the value exactly matches the signature provided in the SecureAuth IdP response header, then the data has not been compromised. If the value does not match the response signature, then the data has been modified. Optional: Configure X-SA-Ext-Date header
The string section for DATE/TIME can be configured to use either the second-precision UTC time or the millisecond-precision format DateTime. If using the millisecond-precision, the date string must be included in the X-SA-Ext-Date header.
|
Configure /users endpoints
Anchor | ||||
---|---|---|---|---|
|
The following endpoints are prepended with the URL, https://SecureAuthIdPFQDN/SecureAuthIdPRealm/api/v1
UI Expand | ||||
---|---|---|---|---|
| ||||
status: The status of userId provided (found, not_found, invalid, etc.); will always be in response message: Additional information regarding the status; will always be in response userId: The user ID provided; will always be in response, whether successful or not properties: The list of available user Profile Properties
knowledgeBase:
Anchor | | userGET | userGET | |
Panel | ||||
borderColor | #126591 | |||
bgColor | white | |||
titleColor | white | |||
borderWidth | 1 | |||
titleBGColor | #126591 | |||
borderStyle | solid | title | GET Endpoint
GET endpoint
Anchor | ||||
---|---|---|---|---|
|
The /users GET endpoint retrieves a list of end
...
user profile properties
...
. SecureAuth IdP accesses and retrieves the user's profile
...
from the username in the endpoint URL.
As a GET endpoint, there is no body, so
...
JSON parameters are not required in the message body.
GET Endpoint | Example |
---|---|
/users/{userId} | https://secureauth.company.com/secureauth2/api/v1/users/ |
...
jdoe |
UI Expand | ||||
---|---|---|---|---|
| Configuration Notes
| |||
WebAdmin Configuration:
Profile data edits:
|
UI Expand | ||
---|---|---|
| ||
Successful GET Retrieval GET retrieval is successful in the following situations:
|
UI Expand | ||
---|---|---|
| ||
groups:
accessHistories:
|
UI Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
PUT / POST endpoints
Anchor | ||||
---|---|---|---|---|
|
...
The /users PUT / POST endpoints add, update, or delete end
...
user profile properties
...
. SecureAuth IdP updates the user's profile
...
by using the username in the endpoint URL.
PUT / POST Endpoint | Example |
---|---|
/users/{userId} | https://secureauth.company.com/secureauth2/api/v1/users/ |
...
jdoe |
UI Expand | ||
---|---|---|
| ||
|
UI Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Body
| Response Examples
| ||||||||||||||||
Anchor | | userPOST | userPOST | |||||||||||||||
Panel | ||||||||||||||||||
borderColor | #126591 | |||||||||||||||||
bgColor | white | |||||||||||||||||
titleColor | white | |||||||||||||||||
borderWidth | 1 | |||||||||||||||||
titleBGColor | #126591 | |||||||||||||||||
borderStyle | solid | title | POST Endpoints
} |
POST endpoints
Anchor |
---|
...
|
...
borderColor | #007fb2 |
---|---|
bgColor | white |
titleColor | white |
borderWidth | 1 |
titleBGColor | #007fb2 |
borderStyle | solid |
title | Create New User |
|
Use the POST endpoints to create an end-user profile, perform an administrative password reset for the end user, and enable end users to change their password when necessary.
Create user
Anchor | ||||
---|---|---|---|---|
|
The /users POST user endpoint creates the new end
...
user profile
...
, so a username is not specified in the endpoint URL
POST Endpoint | Example |
---|---|
/users/ | https://secureauth.company.com/secureauth2/api/v1/users/ |
UI Expand | ||
---|---|---|
| ||
|
UI Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Body
| Response Examples
| ||||||||||||
|
Reset user password
Anchor | ||||
---|---|---|---|---|
|
...
The /users POST resetpwd endpoint performs an administrative password reset for the end
...
user
...
. SecureAuth IdP accesses the end
...
user's profile, resets the user's password, and provides a new
...
password by using the username in the endpoint URL.
POST Endpoint | Example |
---|---|
/users/{userId}/resetpwd | https://secureauth.company.com/secureauth2/api/v1/users/ |
...
jdoe/resetpwd |
UI Expand | ||
---|---|---|
| ||
|
UI Expand | |||||||
---|---|---|---|---|---|---|---|
| Body
| Responses
| |||||
|
User self-service change password
Anchor | ||||
---|---|---|---|---|
|
...
The /users POST changepwd endpoint performs a password reset for the end
...
user
...
. SecureAuth IdP accesses the end
...
user's profile and lets the end
...
user change that password
...
by using the username in the endpoint URL.
POST Endpoint | Example |
---|---|
/users/{userId}/changepwd | https://secureauth.company.com/secureauth2/api/v1/users/ |
...
jdoe/changepwd |
UI Expand | ||
---|---|---|
| ||
|
UI Expand | ||||||
---|---|---|---|---|---|---|
| Body
| Response Examples
|
...
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
...
|
...
Configure group association endpoints
Anchor | ||||
---|---|---|---|---|
|
Admins can use POST messages to associate users with groups
...
and vice-versa.
Types of associations to the /users or /groups endpoint include the following:
- Single user to single group
- Single user to multiple groups
- Single group to single user
- Single group to multiple users
Single user to single group
Anchor | ||||
---|---|---|---|---|
|
...
...
This operation associates a single user in the data store with a single group in the data store.
No message body is required
...
because all parameters for this request are present in the call URL.
POST Endpoint | Example |
---|---|
/users/{userId}/groups/{groupID to associate} | https://secureauth.company.com/secureauth2/api/v1/users/ |
...
jdoe/groups/admins |
Result: userID "
...
jdoe" is associated with the groupID "admins"
UI Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| Examples
| |||||||||
Anchor | | singleGroupMultiUsers | singleGroupMultiUsers | |||||||
Panel | ||||||||||
borderColor | #126591 | |||||||||
titleColor | white | |||||||||
borderWidth | 1 | |||||||||
titleBGColor | #116490 | title | Single Group to Multiple Users
Single group to multiple users Anchor singleGroupMultiUsers singleGroupMultiUsers
singleGroupMultiUsers | |
singleGroupMultiUsers |
This operation associates a list of multiple users with a specified group.
For multiple users, supply the list of users in the POST message body, not the URL.
If any of the userIDs fail to POST, a failure response is generated
...
that lists each userID that failed
...
. userIDs not listed in the failure response successfully POSTed.
POST Endpoint | Example |
---|---|
/users/{userId}/groups/{groupId}/users | https://secureauth.company.com/secureauth2/api/v1/groups/Sharepoint%20Visitors/users |
Result: group "Sharepoint Visitors" is associated with the list of users specified in the message body
UI Expand | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| Body
| Response Examples
| ||||||||||
|
Single group to single user Anchor singleGroupSingleUser singleGroupSingleUser
singleGroupSingleUser | |
singleGroupSingleUser |
...
This operation associates a group in the data store with a single user in the data store
...
; the operation
...
is functionally equivalent to the Single User to Single Group operation
...
.
No message body is required
...
because all parameters for this request are present in the call URL.
POST Endpoint | Example |
---|---|
/groups/{groupID}/users/{userID to associate} | https://secureauth.company.com/secureauth2/api/v1/groups/admins/users/ |
...
jdoe |
Result: groupID "admins" is associated with userID "
...
jdoe"
UI Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| Examples
| |||||||||
Anchor | | singleUserMultiGroups | singleUserMultiGroups | |||||||
Panel | ||||||||||
borderColor | #126591 | |||||||||
titleColor | white | |||||||||
borderWidth | 1 | titleBGColor | #116490
Single
...
user to
...
multiple groups
This operation associates a single user with multiple groups at the same time.
For multiple groups, supply the list of groups in the POST message body, not the URL.
If any of the groupIDs fail to POST, a failure response is generated
...
that lists each groupID that failed
...
. groupIDs not listed in the failure response successfully POSTed.
POST Endpoint | Example |
---|---|
/users/{userId}/groups | https://secureauth.company.com/secureauth2/api/v1/users/ |
...
jdoe/groups |
Result: user "
...
jdoe" is associated with a list of groups specified in the message body
UI Expand | |||||||
---|---|---|---|---|---|---|---|
| Body
| Response Examples
| |||||
|
...
Server error
Anchor |
---|
...
|
...
...
|
Info | |||||
---|---|---|---|---|---|
If a A server error is encountered,returns the following response is returned:
|