-
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
feat(amphora-service)!: add opa client and service #74
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Sebastian Becker <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #74 +/- ##
============================================
+ Coverage 90.04% 90.07% +0.02%
- Complexity 348 397 +49
============================================
Files 49 59 +10
Lines 1326 1471 +145
Branches 70 78 +8
============================================
+ Hits 1194 1325 +131
- Misses 80 93 +13
- Partials 52 53 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
Signed-off-by: Sebastian Becker <[email protected]>
Signed-off-by: Sebastian Becker <[email protected]>
Signed-off-by: Sebastian Becker <[email protected]>
Signed-off-by: Sebastian Becker <[email protected]>
Signed-off-by: Sebastian Becker <[email protected]>
Signed-off-by: Sebastian Becker <[email protected]>
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.
see comments
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.
undo changes
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.
check empty line at end of file
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.
and others
public static final String SECRET_WITH_ID_EXISTS_EXCEPTION_MSG = | ||
"A secret with the given id already exists."; | ||
"A secret with the given id already exists."; |
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.
verify pre-commit formatting
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.
undo
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.
Found only a few smaller things.
|
||
opa: | ||
defaultPolicyPackage: "carbynestack.def" | ||
endpoint: "http://opa.default.svc.cluster.local:8081/" |
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.
Missing new line at EOF.
OpaResult.class) | ||
.isAllowed(); | ||
} catch (CsHttpClientException e) { | ||
log.error("Error occurred while evaluating OPA policy package: {}", e.getMessage()); |
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.
Logging the full exception and not only the message might provide more helpful debugging information in case something goes wrong.
@@ -13,14 +13,17 @@ spring.datasource.username=${POSTGRESQL_USERNAME} | |||
spring.datasource.password=${POSTGRESQL_PASSWORD} | |||
spring.jpa.database=postgresql | |||
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect | |||
spring.jpa.hibernate.connection.autocommit=true | |||
spring.jpa.hi.hibernate.connection.autocommit=true |
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.
is this by purpose?
} | ||
|
||
@Test | ||
void givenNoTokenProvided_whenExtractSubject_thenThrowUnauthorizedException() throws UnauthorizedException { |
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.
Shouldn't his be givenInvalidToken or something alike?
No description provided.