Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

SSO Management API is a REST API for managing SSO Server. With Management API it is possible to automate management tasks that previously were only possible with the web browser based Management Console.

Access to API

To operate REST API an OAuth2 access token is needed. To get the access token an OAuth2 Resource Server configured as Ubisecure agent needs to be activated and configured in the Ubisecure SSO server.

...

Authorization: Bearer {YOUR_SECURE_TOKEN}

Please check OAuth 2.0 API - SSO page for more information about OAuth API.
Please check SSO Management API Configuration Guide for information how to configure and start using SSO API.

...

  • Sites
  • Applications
    • Update application metadata
  • Groups
  • Authentication Policies
    • PolicyItem
  • Links between objects
  • Users
  • Mappings
  • Keys - see 8907526072 for API calls and SSO key rotation for further details

URI format

...

Impersonate user by an application, see Configuring impersonation with Management API - SSO


Mappings

Please read page Management UI Mappings - SSO.

Three kind of mappings:

  • Type outbound user mapping
    • nameIDFormat = urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified 
  • Type persistent ID mapping
    • nameIDFormat = urn:oasis:names:tc:SAML:2.0:nameid-format:persistent 
  • Type transient ID mapping
    • nameIDFormat = urn:oasis:names:tc:SAML:2.0:nameid-format:transient 

Policy function is defined with nameIDFormat attribute when policy is created.


Note

NOTE: Policy function can not be changed after creation. 

...

PUT /outboundMappingPolicy/Example/persistentIDPolicy1
nameIDFormat=urn:oasis:names:tc:SAML:2.0:nameid-format:persistent

Note! At most one outbound mapping policy is allowed per application

Refresh token policy 

Create refresh token policy

...

Panel
bordertrue

Status
colourBlue
titlePUT
 /credential/{site}/{name}

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Query parameters

Content type: application/x-www-form-urlencoded

ParameterTypeRequiredDescription
ktystringyesThe type of the key. For example RSA.
kidstringnoThe key identifier as defined by RFC 7517 JSON Web Key specification.
enabledbooleannoDenotes whether the key is enabled or not. Defaults to false.
usestringno

The usage of the key as defined by RFC 7517 JSON Web Key specification. Valid values are

  • enc - for encryption
  • sig - for signing

If this parameter is not set the key can be used for both signing and encryption.

notBeforedatetimenoThe date and time as specified by ISO 8601 after which the key is valid. If left out the key is valid immediately. When performing an update, leaving this field empty will clear any previously set date and time.
notOnOrAfterdatetimenoThe date and time as specified by ISO 8601 after which the key is not valid. If left out the key will be valid forever. When performing an update, leaving this field empty will clear any previously set date and time.
descriptionstringnoA human-readable description of the key.

Responses

Tip
titleHTTP 200 success


Expand
titleSuccessfully created or updated a key

Accept: application/json

FieldTypeDescription
typestringThe type of the object. Currently this is always set to credential.
idstringThe unique id of the key.
attributes.namestringThe name of the key.
attributes.ktystringThe type of the key. For example RSA
attributes.kidstringThe key identifier as defined by RFC 7517 JSON Web Key specification
attributes.usestring

The usage of the key as defined by RFC 7517 JSON Web Key specification. Valid values are

  • enc - for encryption
  • sig - for signing
attributes.enabledbooleanDenotes whether the key is enabled or not.
attributes.notBeforedatetimeThe epoch timestamp after which the key is valid.
attributes.notOnOrAfterdatetimeThe epoch timestamp after which the key is not valid.
attributes.descriptionstring arrayA human-readable description of the key.



...

Panel
Status
colourGreen
titleGET
 /credential/{site}/{name}

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Responses

Tip
titleHTTP 200 success


Expand
titleSuccessfully retrieved a key

Accept: application/json

FieldTypeDescription
typestringThe type of the object. Currently this is always set to credential.
idstringThe unique id of the key.
attributes.namestringThe name of the key.
attributes.ktystringThe type of the key. For example RSA
attributes.kidstringThe key identifier as defined by RFC 7517 JSON Web Key specification
attributes.usestring

The usage of the key as defined by RFC 7517 JSON Web Key specification. Valid values are

  • enc - for encryption
  • sig - for signing
attributes.enabledbooleanDenotes whether the key is enabled or not.
attributes.notBeforedatetimeThe epoch timestamp after which the key is valid.
attributes.notOnOrAfterdatetimeThe epoch timestamp after which the key is not valid.
attributes.descriptionstring arrayA human-readable description of the key.



...

Panel
Status
colourRed
titleDELETE
 /credential/{site}/{name}

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key to delete.

Responses

Tip
titleHTTP 204 success

No content is returned.

...

Panel

Status
colourBlue
titlePUT
 /server/$link/credential/{site}/{name}

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Responses

Tip
titleHTTP 200 success


Expand
titleSuccessfully associated a key

Accept: application/json

FieldTypeDescription
typestringThe type of the object. Currently this is always set to server.
idstringThe id of the object to which the associated is created.
objects[0].typestringThe type of the associated object. Currently this is always set to credential.
objects[0].idstringThe id of the association.
objects[0].linkstring

Currently this is always set to credential.



...

Panel
Status
colourGreen
titleGET
 /server/$link/credential/{site}/{name}

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Responses

Tip
titleHTTP 200 success


Expand
titleSuccessfully retrieved a key association

Accept: application/json

FieldTypeDescription
typestringThe type of the object. Currently this is always set to server.
idstringThe id of the object to which the associated is created.
objects[0].typestringThe type of the associated object. Currently this is always set to credential.
objects[0].idstringThe id of the association.
objects[0].linkstring

Currently this is always set to credential.



...

Panel
Status
colourRed
titleDELETE
 /server/$link/credential/{site}/{name}

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Responses

Tip
titleHTTP 200 success


Expand
titleSuccessfully deleted key association

Accept: application/json

FieldTypeDescription
typestringThe type of the object. Currently this is always set to server.
idstringThe id of the object from which the associated was removed.



...

Panel
Status
colourGreen
titleGET
 /credential/{site}/{name}/$attribute/csr

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Responses

Tip
titleHTTP 200 success

Expand
titleSuccessfully obtained certificate signing request
Content-Type: application/pkcs10
-----BEGIN CERTIFICATE REQUEST-----
... redacted ...
-----END CERTIFICATE REQUEST-----


...

Panel

Status
colourBlue
titlePUT
 /credential/{site}/{name}/$attribute/csr

Path parameters

ParameterTypeRequiredDescription
sitestringyesThe site where the key is stored. Server keys should be located in System/ServerKeyContainer site.
namestringyesThe name of the key.

Request body

Signed certificate in PEM format.

...