Versions Compared

Key

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

...

The UDMG Server REST API is implemented by a customized version of the waarp-gatewayd serverprovided by the udmg-server daemon and provides all the operations that can be performed with the UDMG Client or with the UDMG Client.

Authentication

Only Local User Account authentication is supported for the REST API.

SSO and LDAP authentication is only used for the Graphical User Interface.


Authentication of REST requests is done using basic HTTP authentication.

This authentication scheme is done using the HTTP Authorization header. To authenticate, the client must:

  1. Obtain user login and password

  2. Build the user ID by concatenating the login, a colon (“:”) character and the password

  3. Encode the obtained identifier in Base64

  4. Prefix the encoded identifier with a declaration of the basic authentication scheme (“Basic”)

For example, if the user enters the name "Aladdin" and the password "open sesame", then the client must send the following header:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

If the authentication of a request fails, the server will respond with an HTTP code .401 - Unauthorized

By default, the UDMG Server has only one "admin" user (password: "admin_password") with all rights, in order to allow the initial configuration of the gateway to be set up. For security reasons, it is strongly recommended when installing the gateway to create new users with more restricted rights, then to delete this "admin" user.

Common Operations

Refer to the original version of the waarp-gatewayd v0.7.1 server documentation for the common operations:

...


Description

URI

http://host_name:port/api/sb_pgp

HTTP Method

POST

Description

Adds a new pgp PGP key

Example URI

http://localhost:808018080/api/sb_pgp

Authentication

HTTP Basic

Consume Content-Typeapplication/json

Response Header

Location – The path to the newly created key

Example

See Add Key: JSON Example.

Properties

See Add Key: JSON Properties.

Add Key: JSON Example 

To create a public pgp PGP key, the syntax is a followas follows:

ExampleJSON
Example Request


Expand
titleJSON


Code Block
languagejs
{
  "name": "test1",
  "owner_type": "users",
  "pgp_name": "test1",
  "pgp_email": "test1@example.com",
  "pgp_algorithm": "4096R",
  "public_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v2.0.22 (GNU/Linux)\n\nmQINBGKYo7EBEACuZBUPLMW0SZA6jrqP5S7RPObj3xInlYR4IsPJZVfmMhJddVIQ\nMDZYfnq5QaRU2qr6qnQo1OXZOMnde8PgjSE7U1g1h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TTPS3+2WEmQARAQABiQIfBBgBAgAJ\nBQJimKOxAhsMAAoJEDPAvtC/Qu1kFMwP/jpKHV282dlGjyKanfUqVYsXJuPbsWpn\no5w+0PMdj9KmxEAzhw6fEUs5eqIXX/+IQe2XehGVipaZZLcL70CmPhLRp2KfIQ7r\nEPRSQa2vfsRHk7MCcgcGIB/q0vRo8sGUkYJnBaPdxZZTLz7wHq45rSFg4F5ELWwE\nbWoSWHMzqJgDqfFHBUUdcH9s9CQEJgPoaQ63O3FYGdga4HBUc74ZNKTsvgobzgIY\n6NXSZK/JdG5O1jo76IqYGxyn6/Rk7UnFZZdAgAadiC73fgB6R7OXlX17hEKtfLy3\n/H2lLUkfjeaCLUYK+lQLi1+Qoovt38QvD47AaU2AZXMFJ3VJBkhfvf48Cu9JkVlL\nE5ny6qSiH/ve44uDeQbPHwbrmBZnqfH4FBu8FWsYgebe1u5BoxnlrdaQPpgJmqYz\naI7FFlwez/eKwPvFb5qyi9UCB3NcY8/ih2Pkfiq588EVXLbzW2STj3T+esHnwDm7\nAO7Xkz0pO5ly7uZFHz179uA1lXCLK5PFLn2ATU3haJBeOVWseQ9W7gMSXdVzvRco\npDMqfRPoLCO02cinCFGfQJNcfhIdqwahefjScM9rfZQiQTN8HqvhQIGSCroNe1cV\ntEbNp5hU2lxQmmGZfbFWNFattz18RsP9MMGXwnOkTC2R6aWaJxwoxEV5lHdV7OJF\n7VMDO1XPOgqd\n=hElb\n-----END PGP PUBLIC KEY BLOCK-----\n",
  "comment": "first test"
}



Example Response


Expand
titleHeaders


Code Block
Location: /api/sb_pgp/test1



...

Property

UI Field Name

Description

nameNameThe name of the key, must be unique.
pgp-namePGP NameThe key user name.
pgp-emailEmailThe associated email.
pgp-algoPGP AlgorithmThe algorithm that was used for creating the key (free text, for reference).
valid-fromStart DateThe valid from date
valid-toEnd DateThe expiration date
private-keyPrivate KeyThe private key. It must be in ascii armored format.
public-keyPublic KeyThe public key. It must be in ascii armored format.
passphrasePassphraseThe passphrase of the private key.
commentCommentAn additional comment to describe the pgp PGP key.

List keys


Description

URI

http://host_name:port/api/sb_pgp

HTTP Method

GET

Description

Displays a list of all keys meeting matching with the criteria below. The private key value is not returned.

Example URI

http://localhost:808018080/api/sb_pgp

Authentication

HTTP Basic

Produce Content-Typeapplication/json

URI Parameters

See List Keys: URI Parameters.

Example

See List Keys: JSON Example.

...


Description

URI

http://host_name:port/api/sb_pgp/key_name

HTTP Method

GET

Description

Retrieves a PGP key details

Example URI

http://localhost:808018080/api/sb_pgp/test1.pub

Authentication

HTTP Basic

Produce Content-Typeapplication/json

Example

See Get a Key: JSON Example.

...


Description

URI

http://host_name:port/api/sb_pgp/key_name

HTTP Method

DELETE

Description

Deletes the given key.

Example URI

http://localhost:808018080/api/sb_pgp/test1.pub

Authentication

HTTP Basic


Audit Management

...