Difference between revisions of "Master Portal sshkey endpoint"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 82: Line 82:
  
 
* A key is identified using the pair ''username'' / ''label'', where username is obtained using the provided access_token. When a key is added without specifying a ''label'', a unique one is created using the prefix ''ssh-key-'' followed by a unique sequence number.
 
* A key is identified using the pair ''username'' / ''label'', where username is obtained using the provided access_token. When a key is added without specifying a ''label'', a unique one is created using the prefix ''ssh-key-'' followed by a unique sequence number.
* A certain public key must be unique for all users, i.e. may only occur once in the ''ssh_keys ''table in the ''oa2server'' database.
+
* A certain public key must be unique for *all* users, i.e. it may only occur once in the ''ssh_keys'' table in the ''oa2server'' database.
* Each user may have at most 5 public keys registered, the maximum being configurable in the server config file (<tt>/var/www/server/conf/cfg.xml</tt>) file via <tt><sshkeys max="5"/></tt>
+
 
 +
== Configuration ==
 +
 
 +
The API is configured via the MasterPortal's server configuration file, <tt>/var/www/server/conf/cfg.xml</tt>, via the <tt><sshkeys></tt> node.<br>
 +
There are currently (v.0.2.0) two configurable parameters:
 +
* The maximum number of public keys a user may register, via the <tt>max</tt> attribute,
 +
* The name of the OAuth2 scope required for making use of the API, via the <tt>scope</tt> attribute.
 +
E.g.:
 +
<!-- Specify allowed number of SSH keys -->
 +
<sshkeys max="5"
 +
          scope="eu.rcauth.sshkeys"
 +
/>

Revision as of 10:39, 2 September 2019