-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Added GMO GlobalSign getting started guide #12761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sid-th
wants to merge
17
commits into
hashicorp:main
Choose a base branch
from
sid-th:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
36b15c0
Add files via upload
sid-th 07da8b4
Update GlobalSign.mdx
sid-th 51002eb
Merge branch 'hashicorp:main' into main
sid-th 0c0baea
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 7ece6e4
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 06f8566
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 4f9adbb
Update website/content/docs/secrets/GlobalSign.mdx
sid-th c0ace60
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 9886f98
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 68c4697
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 267ae28
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 502a0fa
Update website/content/docs/secrets/GlobalSign.mdx
sid-th f361c9e
Update website/content/docs/secrets/GlobalSign.mdx
sid-th bcb0d83
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 0fe1d97
Update website/content/docs/secrets/GlobalSign.mdx
sid-th 7dda01c
Update website/content/docs/secrets/GlobalSign.mdx
sid-th ed1fd40
Update website/content/docs/secrets/GlobalSign.mdx
sid-th File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Add files via upload
- Loading branch information
commit 36b15c083bffdf2bdd965cbb3fc6b0822fc5d685
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
|
||
--- | ||
layout: docs | ||
page_title: GlobalSign Atlas - Secrets Engine | ||
sidebar_title: GlobalSign Atlas | ||
description: |- | ||
The GlobalSign Atlas secrets engine for Vault issuing and managing Atlas certificates. | ||
--- | ||
|
||
# GlobalSign Atlas Secret Engine | ||
|
||
The GlobalSign Atlas secret engine generates, issues, and manages certificates | ||
dynamically in your ATLAS account. This simplifies certificate issuance | ||
and life cycle management, as the engine can manage key generation, life cycle. Additionally | ||
this enables codifying and mapping issuance policy to internal authentication methods such as | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
public cloud credentials or SSO solutions. | ||
|
||
# Setup | ||
|
||
Most secrets engines must be configured in advance before they can perform their | ||
functions. These steps are usually completed by an operator or configuration | ||
management tool. | ||
|
||
This documentation assumes you have already registered the Atlas plugin with your Vault instance, | ||
if you haven't please download the [latest release](https://github.com/globalsign/atlas-hashicorp-vault/releases) and follow [vault's plugin registration instructions](https://www.vaultproject.io/docs/internals/plugins#plugin-registration). | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**_(Note: We have automated most of these plugin registration steps and user can directly navigate to_** `atlas-hashicorp-vault` **_and run_** `make`**_. This will register the plugin and start server)_** | ||
|
||
1. Enable the GlobalSign Atlas secrets engine: | ||
|
||
```bash | ||
$ vault secrets enable atlas | ||
Success! Enabled the atlas secrets engine at: atlas/ | ||
``` | ||
|
||
By default, the secrets engine will mount at the name of the engine. To | ||
enable the secrets engine at a different path, use the `-path` argument. | ||
|
||
2. Configure the credentials that Vault uses to communicate with Atlas to issue and | ||
manage certificates: | ||
|
||
```bash | ||
$ vault write atlas/config/authn \ | ||
api_key=<Your_Atlas_API_Key> | ||
api_secret=<Your_Atlas_API_Secret> | ||
api_cert=$(base64 --wrap=0 < ./your_atlas_client_certificate.pem) | ||
api_cert_key=$(base64 --wrap=0 < ./your_atlas_client_certificate_key.pem) | ||
``` | ||
|
||
Internally, Vault will connect to GlobalSign Atlas using these credentials. | ||
|
||
~> **Notice:** Your client certificate should be provided as a base64 encoded PEM certificate and PEM private key. | ||
You can acquire the certificate from your account manager. | ||
~> **Notice:** If you are getting PEM not recognized errors, you may need to add the `--wrap=0` flag to your base64 commands. | ||
|
||
3. Configure a Vault role that maps to a set of permissions. | ||
```bash | ||
$ vault write atlas/roles/my-role allow_any_name=true enforce_hostnames=false | ||
``` | ||
|
||
This creates a role named "my-role". When users generate certificates against | ||
this role, Vault will validate the certificate request against the permissions. | ||
Vault will then send the certificate request to be issued by your Atlas instance. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The above role constraints are permissive, we would recommend tighter rules to fit your use case. Note that your Atlas account | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
policy will also apply to issued certificates, only certificates that meet both local and Alas policies will be issued. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
4. Issue a Certificate through Vault using your role | ||
```bash | ||
$ vault write atlas/issue/my-role common_name="example.com" ttl=24h | ||
``` | ||
|
||
This creates a Private Key and a Certificate using the provided role and certificate configuration. You can reference this | ||
certificate in future requests using the serial number returned in the response. | ||
|
||
Keep note of your private key, you won't be able to retrieve it in future requests. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
5. Sign a CSR through Vault using your role | ||
```bash | ||
$ vault write atlas/sign/my-role csr="$(cat my_signing_request.csr)" ttl=48h | ||
``` | ||
|
||
This will evaluate your signing request and other options against your local role and Atlas account policy, if successful it will | ||
return a signed certificate and serial number for future reference. | ||
|
||
6. List Your Certificates | ||
```bash | ||
$ vault list atlas/certs | ||
``` | ||
|
||
This returns a list of certificate serial numbers that have been issued through this Vault cluster. This can be used for | ||
getting more details or revoking certificates. | ||
|
||
7. Get Details on a Certificate | ||
```bash | ||
$ vault read atlas/cert/00-00-00-00-00-00-00-... | ||
``` | ||
|
||
This will give you the certificate pem and other issuance metadata, you can get the serial number from the certificate itself if | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
you would like to reverse this, but you must separate hex pairs with `-`. | ||
|
||
Note that you can only get details on certificates issued through this Vault cluster, once a certificate is expired | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
or revoked it will remain visible here for a short period of time. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
8. Revoking a Certificate | ||
```bash | ||
$ vault write atlas/revoke serial_number=00-00-00-00-00-00-00-... | ||
``` | ||
|
||
Just like Get details this requires a `-` separated serial number. This will have your Atlas account add the certificate to | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
relevant revocation lists, and update its status within the Vault cluster. | ||
|
||
If you are revoking lots of certificates it's a good idea to invoke tidy, which will clean up excess metadata within Vault. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```bash | ||
$ vault write atlas/tidy | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
[](https://asciinema.org/a/K5k9khe33IN7Ewot6yMN6yjBB) | ||
|
||
## Troubleshooting | ||
|
||
If you get stuck at any time, simply run `vault path-help atlas` or with a subpath for | ||
interactive help output. | ||
|
||
### Not Authenticated Error | ||
|
||
If you are seeing unauthenticated errors from Atlas you may need to update the credentials stored in Atlas. You can do this by calling the `config/authn` endpoint. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Unable to Find Certificate Issued Outside of Vault | ||
|
||
The Atlas plugin will only keep track of certificates issued through the plugin, outside certificates won't be visible nor can they be mutated. | ||
sid-th marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## API | ||
|
||
The Atlas secrets engine has a full HTTP API. Please see the | ||
[Atlas secrets engine API](https://github.com/globalsign/atlas-hashicorp-vault/blob/master/website/pages/api-docs/secret/vault-plugin-secrets-atlas/index.mdx) for more | ||
details. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.