Skip to content

Commit 1f6241d

Browse files
update based on gmourier's review
1 parent 22d8032 commit 1f6241d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

learn/security/master_api_keys.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ You can access the [`/keys` route](/reference/api/keys.md) using the master key
8686

8787
Though the default API keys are usually enough to manage the security needs of most applications, this might not be the case when dealing with privacy-sensitive data. In these situations, the fine-grained control offered by the `/keys` endpoint allows you to clearly decide who can access what information and for how long.
8888

89-
The [`key`](/reference/api/keys.md#key) field is generated by hashing the master key and the [`uid`](/reference/api/keys.md#uid):
89+
The [`key`](/reference/api/keys.md#key) field is generated by hashing the master key and the [`uid`](/reference/api/keys.md#uid). As a result, `key` values are deterministic between instances sharing the same configuration. Since the `key` field depends on the master key, it is not propagated to dumps and snapshots. If a malicious user ever gets access to your dumps or snapshots, they will not have access to your instance's API keys.
90+
91+
It is, therefore, possible to determine the value of the `key` field by using the following command:
9092

9193
```bash
9294
echo -n $HYPHENATED_UUID | openssl dgst -sha256 -hmac $MASTER_KEY
9395
```
9496

95-
As a result, `key` values are deterministic between instances sharing the same configuration. Since the `key` field depends on the master key, it is not propagated to dumps and snapshots. If a malicious user ever gets access to your dumps or snapshots, they will not have access to your instance's API keys.
96-
9797
This is also useful in continuous deployment processes as you know the value of the `key` field in advance.
9898

9999
### Updating an API key

0 commit comments

Comments
 (0)