generated from mintlify/starter
-
Notifications
You must be signed in to change notification settings - Fork 5
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
add Project Auth section #73
Closed
kevinmingtarja
wants to merge
2
commits into
main
from
kevinm/hyp-2744-allow-users-to-rotate-api-keys
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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,48 @@ | ||
--- | ||
title: Project Auth | ||
description: "Manage auth for your project" | ||
--- | ||
|
||
By default, Hypermode protects your project's endpoint with an API key, but you | ||
can also bring your own auth too. | ||
|
||
## Retrieve API key | ||
|
||
To use the Hypermode API key, navigate to **Settings** → **API Keys** in your | ||
project dashboard. From there, you can copy your API key to a secure location | ||
for your app to consume. | ||
|
||
## Rotate API key | ||
|
||
There might be times when you need to rotate your API key. This could be due to | ||
a security breach, accidentally leaking your API key, and so on. | ||
|
||
Before rotating your API key, navigate to **Settings** → **Auth** in your | ||
project dashboard. Take note of the name of the `PEM key` with `hypermode-` as | ||
the prefix. You will need to delete this as the final step of this process. | ||
|
||
Next, navigate to **Settings** → **API Keys**, and click the `Rotate` button. | ||
This will generate a new API key, and you can copy it to a secure location. | ||
|
||
At this point, both the old and new API keys are valid. This is so that you can | ||
update your app to use the new API key without incurring any downtime. | ||
|
||
Once you have updated your app to use the new API key, navigate back to | ||
**Settings** → **Auth**. You will notice that there are now two `PEM keys`, the | ||
one you saw earlier, and the new one, also prefixed with `hypermode-` but with | ||
different random characters. You can now safely delete the old one. This will | ||
invalidate the old API key. | ||
|
||
## Bring your own auth | ||
|
||
As you may have known, Modus has its own [authentication](/modus/authentication) | ||
features. So you can choose to implement your own auth, instead of using the | ||
Hypermode API key. | ||
|
||
To do this, navigate to **Settings** → **Auth** in your project dashboard. From | ||
there, you can upload your own verification key either as a JWKS endpoint or in | ||
PEM encoded format. The Modus runtime will use this to verify the JWTs sent to | ||
Check failure on line 44 in project-auth.mdx
|
||
your app. | ||
|
||
At this point, you can safely delete the default Hypermode `PEM key` to | ||
invalidate the Hypermode API key. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I understand why they need to do this, but unless they read these docs very carefully, it's likely they won't. Then they'll get to the final step and not know which to delete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we expose when the API key was created so they can easily find the oldest one?