Skip to content
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

Merged
merged 11 commits into from
Mar 4, 2020
Merged

add new s2s filter #46

merged 11 commits into from
Mar 4, 2020

Conversation

mrganeshraja
Copy link
Contributor

JIRA link (if applicable)

Change description

Create a new s2s filter.

Does this PR introduce a breaking change? (check one with "x")

[x] Yes
[ ] No


private final AuthTokenValidator authTokenValidator;

@Autowired

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@timja timja left a 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?

README.md Outdated
@@ -50,6 +50,13 @@ A spring bean:

}
```
##Configuration for Service Authentication filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space missing

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Ganesh Raja and others added 4 commits March 4, 2020 10:13
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>
@mrganeshraja mrganeshraja merged commit af8ee16 into master Mar 4, 2020
@Michael1142 Michael1142 deleted the add_s2s_filter branch February 8, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants