-
Notifications
You must be signed in to change notification settings - Fork 89
add concept of secrets #180
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b52dfb0
add @sourcebot/schemas package
brendan-kellam 5a53a41
migrate things to use the schemas package
brendan-kellam 46c38ba
Dockerfile support
brendan-kellam c680356
add secret table to schema
msukkari 71b9d5c
Add concept of connection manager
brendan-kellam 20b09b0
Rename Config->Connection
brendan-kellam cc6bf12
Handle job failures
brendan-kellam c836adb
Add join table between repo and connection
brendan-kellam 80de9f7
nits
brendan-kellam ad837ed
merge v3 into secrets branch
msukkari b452d62
create first version of crypto package
msukkari 28ae6fe
add crypto package as deps to others
msukkari e1d0a87
forgot to add package changes
msukkari 741cc45
add server action for adding and listing secrets, create test page fo…
msukkari b3fb769
add secrets page to nav menu
msukkari f62a6cf
add secret to config and support fetching it in backend
msukkari 8de69b2
reset secret form on successful submission
msukkari 9adaeb5
add toast feedback for secrets form
msukkari 4d0737b
add instructions for adding encryption key to dev instructions
msukkari c9e10a5
add encryption key support in docker file
msukkari ef948e5
add delete secret button
msukkari b6f2e27
fix nits from pr review
msukkari 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 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
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
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
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
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
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
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
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
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
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
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 @@ | ||
.env.local |
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,16 @@ | ||
{ | ||
"name": "@sourcebot/crypto", | ||
"main": "dist/index.js", | ||
"version": "0.1.0", | ||
"scripts": { | ||
"build": "tsc", | ||
"postinstall": "yarn build" | ||
}, | ||
"dependencies": { | ||
"dotenv": "^16.4.5" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^22.7.5", | ||
"typescript": "^5.7.3" | ||
} | ||
} |
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,17 @@ | ||
import dotenv from 'dotenv'; | ||
|
||
export const getEnv = (env: string | undefined, defaultValue?: string, required?: boolean) => { | ||
if (required && !env && !defaultValue) { | ||
throw new Error(`Missing required environment variable`); | ||
} | ||
|
||
return env ?? defaultValue; | ||
} | ||
|
||
dotenv.config({ | ||
path: './.env.local', | ||
override: true | ||
}); | ||
|
||
// @note: You can use https://generate-random.org/encryption-key-generator to create a new 32 byte key | ||
export const SOURCEBOT_ENCRYPTION_KEY = getEnv(process.env.SOURCEBOT_ENCRYPTION_KEY, undefined, true)!; |
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.
Uh oh!
There was an error while loading. Please reload this page.