-
Notifications
You must be signed in to change notification settings - Fork 1
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 new s2s filter #46
Conversation
|
||
private final AuthTokenValidator authTokenValidator; | ||
|
||
@Autowired |
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.
you might need @component annotation for auto-wire or leave filter bean definition to calling services including @value.
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.
Good point, I have left he ServiceFilter as is and instead created the bean using AutoConfiguration that enables with conditional property.
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.
Some documentation or a sample implementation?
src/main/java/uk/gov/hmcts/reform/authorisation/ServiceAuthAutoConfiguration.java
Show resolved
Hide resolved
README.md
Outdated
@@ -50,6 +50,13 @@ A spring bean: | |||
|
|||
} | |||
``` | |||
##Configuration for Service Authentication filter |
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.
Space missing
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.
Intellij didn't complain 👍
ServiceAuthFilter bean is OncePerRequestFilter filter that you can add to your filter chain to authorise service | ||
request. The filter will expect 'ServiceAuthorization' Bearer token as part of the request header that it will consume | ||
to approve the request. Any requests from services that are not in your authorised services list will deny access | ||
to your service and return an HTTP response status code 403 (forbidden) and for any other reasons if the token is |
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.
to your service and return an HTTP response status code 403 (forbidden) and for any other reasons if the token is | |
to your service, returning an HTTP response status code 403 (forbidden) and for any other reasons if the token is |
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 👍
src/main/java/uk/gov/hmcts/reform/authorisation/filters/ServiceAuthFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/reform/authorisation/filters/ServiceAuthFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/gov/hmcts/reform/authorisation/validators/ServiceAuthTokenValidator.java
Outdated
Show resolved
Hide resolved
Co-Authored-By: Tim Jacomb <tim.jacomb@hmcts.net>
Co-Authored-By: Tim Jacomb <tim.jacomb@hmcts.net>
…eAuthFilter.java Co-Authored-By: Tim Jacomb <tim.jacomb@hmcts.net>
…viceAuthTokenValidator.java Co-Authored-By: Tim Jacomb <tim.jacomb@hmcts.net>
…eAuthFilter.java Co-Authored-By: Tim Jacomb <tim.jacomb@hmcts.net>
JIRA link (if applicable)
Change description
Create a new s2s filter.
Does this PR introduce a breaking change? (check one with "x")