Standard authentication using standard Spring authentication mechanism. No extra actions needed to use it, it is available by default.
Default authentication using a standard Spring authentication mechanism. No extra actions are needed to use it, it is available by default. You can choose from the following password encoder security algorithms:
To select a pbkdf2 algorithms, you must set hyperon.security.basic.password-encoder property in the application.properties file as follows:
What's more, you can choose the complexity of bcrypt algorithm. In order to do that, a hyperon.security.basic.bcrypt.complexity property in the application.properties must be set. Values between 4 and 31 are accepted, 5 is used by default. The bigger the value the safer algorithm is, but the performance impact is also increasing.
hyperon.studio.security.type environment variable must be set to "ad"
To use Active Directory authentication, 3 properties must be specified in application.properties file:
Hyperon supports role management. Roles defined in Active Directory must be compatible with roles in Hyperon structure.
It is possible to create own roles in AD but remember to create same roles in Hyperon structure. It's necessary to proper authentication process.
In bin/setenv.sh set flag for Java Virtual Machine:
Authentication in Hyperon Studio can be set by environment variable hyperon.studio.security.type.
In conf/application.properties set properties:
https://localhost:8080/hyperon/saml/metadata
If you choose to set hyperon.saml.roles.origin to "internal" Hyperon will be taking roles from database instead of saml assertion response in order to authorize user. In that case role for first admin user need to be specified through sql insert.
Examples of defining roles and attributes in ADFS.
BASIC ATTRIBUTES:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("mail", "firstname", "surname"), query = ";mail,givenName,sn;{0}", param = c.Value);
ROLES:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value == "S-1-5-21-1861533720-3376411538-4102833532-1113", Issuer == "AD AUTHORITY"]
=> issue(Type = "roles", Value = "MPP_USER", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, ValueType = c.ValueType);
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", Value == "S-1-5-21-1861533720-3376411538-4102833532-1114", Issuer == "AD AUTHORITY"]
=> issue(Type = "roles", Value = "MPP_ADMIN", Issuer = c.Issuer, OriginalIssuer = c.OriginalIssuer, ValueType = c.ValueType);
1. Go to Azure Active Directory tab in Azure console
2. Register Hyperon app under "App registrations".
3. Select registered app
4. Add redirect url under "Hyperon" → "Authentication":
- Choose "Add a platform" → "Web",
- Paste url *http://{hyperon_context_url}/login/oauth2/code/* for example; *http://localhost:8080/hyperon/login/oauth2/code/*,
- no need to check any checkbox related to auth tokens
5. Add Hyperon role (e.g. MPP_ADMIN) under "Hyperon" → "App roles" (User & Groups).
6. Generate secret for the app under "Hyperon" → "Certificates & Secrets".
7. Go back to Active Directory tab
8. Go to "Enterprise applications" and choose the newly added app.
9. From "Enterprise applications" go to "Users and groups" and add a user. Select previously created role while adding a new user.
10. Go back to Active Directory tab
11. Go to "App registration" → "Hyperon" → "Token Configuration" and add an optional claim. "Token Type" → "ID" and choose email. Check "Turn on the Microsoft Graph profile permission (required for claims to appear in token)." from the popup.
In properties fill following:
Set environment variable hyperon.studio.security.type to azuread and deploy Hyperon Studio.
Type environment variable must be set to "jwt"
To use JWT Token authentication, a hyperon.security.jwt.secret-key property must be set in Hyperon Studio's application.properties file as well as Hyperon Runtime REST. What's more, it must be the same key in both places.
You can generate a new token in Hyperon Studio. A view to see all existing tokens as well as a button to generate a new one can be found in Menu's Tools tab. When creating a new token, you can specify the expiry date. Admin users may also specify a user that a newly generated token will be assigned to.
To use generated token in REST API calls, you need to add an Authorization header with the following format:
Authorization: Bearer your_jwt_token
for example:
Authorization: Bearer eyJhbGciOiJIUzI1N