Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
keystore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
id
keystore
Commits
26a3d5dc
Commit
26a3d5dc
authored
7 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Add a README with the API description
parent
c05eedc7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+51
-0
51 additions, 0 deletions
README.md
with
51 additions
and
0 deletions
README.md
0 → 100644
+
51
−
0
View file @
26a3d5dc
keystore
========
KeyStore holds
*unencrypted*
secrets on behalf of users in memory for
a short time (of the order of a SSO session lifespan). User secrets
can be
*opened*
with a password (used to decrypt the key, which is
stored encrypted in a database),
*queried*
by presenting a suitable
authentication token, and
*closed*
(wiped and forgotten).
The database can provide multiple versions of the encrypted key (to
support multiple decryption passwords), in which case we'll try
them all sequentially until one of them decrypts successfully with
the provided password.
In order to query the KeyStore, you need to present a valid SSO
token for the user whose secrets you would like to obtain.
# API
The server exports an API over HTTP/HTTPS. All requests should be made
using the POST method and a Content-Type of
*application/json*
. The
request body should contain a JSON-encoded object. Responses will be
similarly JSON-encoded.
`/api/open`
(
*OpenRequest*
)
Retrieve the encrypted key for a user, decrypt it with the provided
password, and store it in memory.
OpenRequest is an object with the
following attributes:
*
`username`
*
`password`
to decrypt the user's key with
*
`ttl`
(seconds) time after which the credentials are automatically
forgotten
`/api/get`
(
*GetRequest*
) ->
*GetResponse*
Retrieve the key for a user. GetRequest must contain the following
attributes:
*
`username`
whose key you wish to retrieve
*
`sso_ticket`
with a valid SSO ticket for the
*keystore*
service
If the request is successfully authenticated, GetResponse will contain
a single attribute
*key*
.
`/api/close`
(
*CloseRequest*
)
Forget the key for a given user.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment