Alison-Server is a Remote Signing Service Provider. It is a service that manages credentials on behalf of multiple users and allowing them to create a remote signature with a stored credential. A credential is the combination of a public/private key pair and a public x.509 certificate.
Alison-Server allows:
The generation of credentials, protecting them with second-factor authentication (such as PIN and OTP).
Use the credentials to create remote signatures in different formats.
Its REST interface allows managing the complete life cycle of a credential, and it may require the participation of the holder for some tasks, such as the renewal or re-issue of it.
Alison-Server has a modular architecture, which allows defining several redundant modules to operate in high availability mode, with clusters replicated by means of a shared database.
Alison-Server is designed so the same instance can be shared between different organisations. It is also possible to separate different users of the same organisation into isolated groups.
Below are some fundamental terms that are useful to understand the configuration and architecture:
It refers to the installation of a component, distributed as a Docker component. Each component can manage several tenants.
A Tenant defines the minimum control unit of Alison-Server, and it store certificates and credentials from related end users.
Each credential is created within a Tenant, which usually represents a complete organisation.
A Tenant can contain credentials with certificates that were issued by different issuers (ACs) within the PKI of an organisation.
Alison-Server can manage several Tenants within its configuration and each of them managed with its own security policy.
When a product or service wants to access certificates stored into different Tenants, it must use an API-Key that allows access to all of them at the same time. |
A Seat represents an individual, holder of credential. Each Seat belongs to a particular Tenant.
A Seat can contain several credentials.
A credential is the combination of a public/private key pair and an x.509 public certificate.
It is protected with second-factor authentication (OTP and PIN) to improve security.
An authentication factor is a piece of information used to verify the identity of an entity.
A second-factor authentication means that in order to access the protected resource (the credential) the user must have something to prove his identity. Alison-Server supports the use of PINs, OTPs or both.
An OAuthClient is an application that can make use of Alison-Server services.
It must have a key (API-Key) that allows access to all Alison-Server resources.
Alison SDK allows a developer to integrate Alison Desktop in its pages in an easier way. Go to the Alison SDK documentation.
Debbie is used to validate certificates and signatures.
Each OAuthClient has the following attributes:
An identifier of the client.
A secret that is used to authenticate to the authorization server
The OAuth2 grant type that the client can use. Currently, only "client_credentials" is supported.
Defines the validity time (in seconds) of the generated token. Only values greater than 0 are accepted.
An example of this definition is below:
{ "clientId": "acme", "clientSecret": "acme_password", "authorizedGrantTypes": "client_credentials", "accessTokenValidity": 3600 } |
Alison-Server protects its resources with OAuth2 mechanisms. In order to access any resource, it is necessary to send an authorization token, which is provided by an authorization server.
In order to get a token the following information must be sent:
The ClientId that was used when creating the OAuthClient.
The secret that was sent when creating the OAuthClient.
The OAuth2 grant type that will be used for authorization. Currently, only "client_credentials" is supported.
A string containing information of the seat and tenant that will be used in the following requests. Both seat and tenant are required.
The scope's format is:
seat:$value tenant:$value
All the information must be sent as form-data.
Example:
client_id acme client_secret acme_password grant_type client_credentials scope seat:jdoe@acme |
Tokens can be checked through the "check_token" service. This is useful to check if the token has expired before making a request to a service.
Tokens also can be revoked through the "revoke" service. When a token is revoked, it cannot be used again.
Any client application can create a credential following these steps:
Client must obtain an OAuth2 token from Alison-Server to access any service. In this case a scope is not required.
When creating a credential it is mandatory to indicate an Authorization Configuration. A parameter indicating the number of Multi Signatures can be sent too.
This configuration specifies the type of authorization (explicit, implicit and oauth2) and any extra configuration associated with the chosen type. For example, in explicit authorization you have to configure either OTP or PIN or both are required. The configuration is indicated passing the ID of the configuration.
Currently only explicit authorization is supported. |
This value specifies the maximum number of signatures that can be created in one request. Default is 1.
Once the credential is created, it is neccesary to add the required second factors according to the chosen configuration.
Credentials can be protected with PIN, OTP or both, but al least one of the second factors is required, otherwise the credential would be left unprotected. If more than one second factor is required, two calls to the service must be done indicating in each case the type of second factor that is being added.
When adding a PIN, a secret value must be specified. This value is the raw password that will be required when trying to access the credential.
When adding an OTP, no secret value must be specified because it is generated by the service. In the response the generated secret will be returned as well as any other information associated with the generated OTP, such as the issuer and the user.
After generating the secret it is neccesary to confirm that the OTP has successfully been retrieved. When confirming the OTP an OTP Value must be sent.
After all required Second Factors has been added a Key Pair can be generated. In this case the key algorithm and length must be sent, as well as the CSR signature algorithm. When generating the Key Pair, a CSR is returned. This CSR must be signed by a CA, in order to get a Certificate.
Once the CSR has been signed by a CA and a Certificate is obtained, it must be asociated with the credential. The Certificate must be sent with the complete Certificate Chain (root, intermediate and end certificates). It has to be sent in PKCS7 format. If the end Certificate Public Key does not match the stored public key an error will be returned.
Any client application can create a signature follow these steps:
Client must obtain an OAuth2 Token from Alison-Server to access any service. When requesting this token a scope must be specified. This scopes indicates the Seat that must be used in the following requests. The scope has the following format:
seat:jdoe@acme
All stored credentials can be listed. The result of the list service is a list of IDs. Only the credentials of the Seat that appears in the scope of the OAuth2 Token are listed.
In order to retrieve the information of a credential the Credential Info service must be used, passing the Credential ID. Other parameters can be specified too, such as:
Indicates if the certificate in Base64 must be returned. Values are: "none" (no certificate is returned), "single" (only end entity certificate is returned), "chain" (the whole certificate chain is returned). The default value is "single".
Requests to retrieve the information of the certificate in different attributes. If set to true, the Certificate will be parsed and all the information will be retrieved in differente attributes. Default is "false".
Request to return various parameters containing information on the authorization mechanisms supported by this credential (PIN and OTP groups). The default value is “false”.
When signing a hash, a SAD is required. A SAD is a token that allows access to the signature service. The token is attached to the information to be signed to increase the security. To obtain a SAD the Authorize Credential service must be used. This service requires, besides the Credential ID:
If the PIN and OTP values are correct, a SAD is generated and returned. This SAD is associated with the hashes sent in the request, so trying to sign a different hash with this SAD will throw an error.
When creating a signature the following parameters are required:
If the sign process is successful, an array with all the signatures will be returned. The signatures will be returned in the same order as the hashes were sent.
When an error occurs a specific response is sent to the client that made the request. The structure of all error responses is the following:
{ "error": <error>, "error_description": "<error_description>" } |
error | error_description | cause |
---|---|---|
invalid_request | Payload is required | The service expects a payload in the request but none was sent |
error | error_description | cause |
---|---|---|
invalid_request | ClientId is null or empty | The clientId was not sent or is an empty string |
invalid_request | ClientSecret is null or empty | The clientSecret was not sent or is an empty string |
invalid_request | AuthorizedGrantTypes is null or empty | The authorizedGrantTypes was not sent or is an empty string |
invalid_request | Unsupported grant type | The specified grant type is not currently supported by the server |
invalid_request | AccessTokenValidity is null | The access token validity was not sent |
invalid_request | The Access Token Validity must be greater than 0 | The access token validity is less or equals 0 |
invalid_request | The client already exists | The value specified in clientId is already taken by another client |
not_found | The client was not found | There was no client that matches the specified clientId |
error | error_description | cause |
---|---|---|
invalid_client | Bad client credentials | Either client_id or client_secret or both are invalid |
unsupported_grant_type | Unsupported grant type: $grant_type_value | The sent grant type ($grant_type_value) is not supported |
invalid_token | Token was not recognized | When calling check_token with a token that does not exist |
invalid_token | Token has expired | The access token validity time has elapsed |