-
Notifications
You must be signed in to change notification settings - Fork 0
Cleanup & Refactor #3
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
ivan-c
wants to merge
32
commits into
main
Choose a base branch
from
fixup/cleanup
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 all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
5adc353
cleanup
ivan-c f010bc0
Rename auth server to generic role-based name
ivan-c be85bdc
Add comment;fixup quoting
ivan-c de6eeb5
Remove default redirect URL
ivan-c fdbd4ff
Add comment; cleanup format
ivan-c 7258834
Move CLI config to env var
ivan-c a018060
Add comment
ivan-c dcad468
Rename middleware
ivan-c 2a6bea2
WIP Switch to env var
ivan-c 296413e
Revert "WIP Switch to env var"
ivan-c 4a12e0d
Remove quoting
ivan-c 130911a
Add docs
ivan-c 084aea2
Reorganize and document settings
ivan-c ee44593
Make label formatting consistent
ivan-c 00afd12
Remove testing override
ivan-c 97b1102
Update postgres
ivan-c cb23062
Make init SQL read-only
ivan-c b8bd473
Regroup labels
ivan-c 2207336
Remove whitespace
ivan-c f55e0af
Add missing LE config
ivan-c 5f01e51
Fixup traefik port config
ivan-c e90cccf
Merge branch 'main' into fixup/cleanup
ivan-c 39bbf93
Add missing SQL file
ivan-c 5a794e7
Make secrets configurable; remove default IP
ivan-c 53dcc56
Rearrange header section
ivan-c 0fc3ddd
Remove unnecessary config; add comment
ivan-c 000b902
Move final CLI arg to env var
ivan-c 1ab87e3
Remove unnesc. quoting
ivan-c f360e05
Rearrange sections
ivan-c e0299dd
Add middleware for postgrest, to strip Authorization header (#4)
ivan-c 91241c3
Reword comment
ivan-c 4678954
Remove example override
ivan-c 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
ACME_EMAIL= | ||
OAUTH_COOKIE_SECRET= | ||
COMPOSE_PROJECT_NAME= | ||
|
||
OAUTH2_PROXY_CLIENT_ID=auth_proxy_test | ||
OAUTH2_PROXY_CLIENT_SECRET=74c6fdc4-4086-4a21-bf40-49c7ee74357e | ||
|
||
OAUTH2_PROXY_COOKIE_SECRET=OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w= | ||
PGRST_JWT_SECRET= | ||
|
||
# your public IP address | ||
IP= |
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,20 @@ | ||
-- create schema used for API | ||
create schema api; | ||
|
||
-- create table used for log events | ||
create table api.events ( | ||
id serial primary key, | ||
event jsonb not null | ||
); | ||
|
||
-- create web user w/ read only auth | ||
create role web_anon nologin; | ||
grant usage on schema api to web_anon; | ||
grant select on api.events to web_anon; | ||
|
||
-- create privileged user to write events | ||
create role event_logger nologin; | ||
grant usage on schema api to event_logger; | ||
grant all on api.events to event_logger; | ||
grant usage, select on sequence api.events_id_seq to event_logger; | ||
|
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.
as we plan to discontinue sending a customized, pre-baked JWT with the claim
"role": "event_logger"
, I would expect we need to bless the web_anon role with grants like those given toevent_logger
below?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.
Thanks for the reminder! I hadn't tested writing values into logserver (only viewing existing data). I'll make sure to test that the
web_anon
role can write events without authentication