OAuth 2.0 integration
The deviceWISE runtime supports the integration of its security feature with a centrally managed service like Active Directory Federation Service (OAuth 2.0).
OAuth 2.0 package installation and Roles definition
- Go to the Administration -> Packages tab and install the OAuth2 extension package. For more information on installing packages, see Packages.
- Configure Roles within deviceWISE based on existing
ADFS groups
- Configure Active Directory Groups.
- Adds ADFS users to the ADFS groups.
- Use the Administration → Security tab to create Roles that have the same name as an ADFS group.
- Use the Administration → Security tab and
edit a security Policy.
- In the column that shows the new Role, configure the authorization to deviceWISE Resources as described in Policies tab
- The Administration → Security tab
definition of Users is not necessary, as the
User to Role(s) assignment will be retrieved
from ADFS.
- Add properties to configure the OAuth extension's
behavior:
- The signature validation of the Access
Token can be turned off by specifying the
property oauth2.token_validation=FALSE.
- This can be useful when initially developing the OAuth 2.0 integration.
- RSA(256,384,512) signature is supported.
- SSL certificate is supported by specifying the property oauth2.ssl.cert_path="/path/to/certs" and is added to search(non-recursive) for all certs under the path, if any of the certs matches the server key, access will be granted. If both oauth2.ssl.cert_path and oauth2.ssl.cert_file are specified in the properties file, oauth2.ssl.cert_file will be ignored.
- HMAC(SHA 256,384,512) signature is
supported.
- Secret MUST be used by specifying
the property
oauth.hmac.secret=PLAINTEXT.
- Secret MUST be used by specifying
the property
oauth.hmac.secret=PLAINTEXT.
- The signature validation of the Access
Token can be turned off by specifying the
property oauth2.token_validation=FALSE.
Runtime access
- In the JavaScript application, login to the ADFS
server and acquire an Access Token. This login workflow
is outside of deviceWISE.
- Login to deviceWISE with the JavaScript
devicewise.oauthLogin API, passing the Access
Token.
- deviceWISE will validate the Access Token.
- Claim "exp" will be used to check if the Access
Token has expired.
-
Claim "group" will be used to create a deviceWISE user.
deviceWISE will use the CN values as the roles of the user and use CommonName as part of the generated user name, the password of the generated user will be a non-modifiable random string.
- deviceWISE returns a session ID associated with the
auto-generated-user in the devicewise.oauthLogin
response.
- The JavaScript application can start using other APIs with the session ID returned from the login request.