Skip to content

Output Subject Claim as Identity in Logging interceptor - #946

Merged
feast-ci-bot merged 21 commits into
feast-dev:masterfrom
mrzzy:use-auth-claim-logging-interceptor
Aug 31, 2020
Merged

Output Subject Claim as Identity in Logging interceptor#946
feast-ci-bot merged 21 commits into
feast-dev:masterfrom
mrzzy:use-auth-claim-logging-interceptor

Conversation

@mrzzy

@mrzzy mrzzy commented Aug 12, 2020

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

  • Moves subjectClaim option from feast.authorization.options to feast.authentication.options
    • Since subjectClaim options is used by GrpcMessageInterceptor even when only authentication is enabled.
  • Update GrpcMessageInterceptor to output subject claim as identity.
    • ie for the google authentication provider, this would output the users email as identity.
    • uses subject claim configed via feast.authentication.options.subjectClaim.
  • Merges feast-auth module into feast-common module to prevent a circular dependency.
  • Disables Spring Security autoconfiguration beans as security is not yet implemented for Job Controller.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

* Moved `subjectClaim` option from feast.authorization.options to feast.authentication.options
* Message Audit Logs will now output configured Subject Claim as Identity instead of Subject when feast.authentication.options.subjectClaim is set

Comment thread auth/src/main/java/feast/auth/interceptors/GrpcMessageInterceptor.java Outdated
@mrzzy

mrzzy commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-redis-cluster

@mrzzy

mrzzy commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-auth

3 similar comments
@mrzzy

mrzzy commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-auth

@mrzzy

mrzzy commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-auth

@mrzzy

mrzzy commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-auth

@mrzzy

mrzzy commented Aug 13, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end

@mrzzy mrzzy added compat/breaking Breaking user-facing change kind/feature New feature or request labels Aug 14, 2020
Comment thread auth/src/main/java/feast/auth/config/SecurityProperties.java Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should the comment above this one be below at the options?

@mrzzy

mrzzy commented Aug 21, 2020

Copy link
Copy Markdown
Collaborator Author

/retest

@woop

woop commented Aug 21, 2020

Copy link
Copy Markdown
Member

/lgtm

@mrzzy

mrzzy commented Aug 24, 2020

Copy link
Copy Markdown
Collaborator Author

/retest

@mrzzy

mrzzy commented Aug 24, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this still have to be so permissive?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Opted for disabling Spring Security autoconfiguration beans instead of hardcoding endpoints to disable in WebSecurityConfig.

Comment thread pom.xml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is this for?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Originally doclint is enabled via the maven-compiler-plugin option here. This enables doclint from maven-javadoc-plugin so that we can disable doclint for classpath of the OpenAPI client which fails doclint.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But there is an exclusion. Why did this work in the past but not any more?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm am not entirely sure myself.
The effect of this move is that doclint moves from the compile maven lifecycle to the test maven lifecycle.
Doclint still works and flags issues with the docs.

mrzzy added 21 commits August 27, 2020 16:16
…tead of just id

For the 'google' authentication provider this means that the email would
be output as identity instead of just a user id
* This is done as subjectClaim would be used even when only
  authentication is enabled.
* For HttpAuthorizationProvider, which requires both authentication and
  authorization options, the options maps are merged together.
…ding dummy WebSecurityConfig

As GrpcMessageInterceptor is moved feast-auth package to prevent a
circular dependency, jobcontroller has to import feast-auth to get
GrpcMessageInterceptor. feast-auth also imports spring security,
which automatically requires WebSecurityConfigurerAdapter to be present
in the spring application context.

Commit provides a dummy WebSecurityConfigurerAdapter required to
statisfy spring.
@mrzzy

mrzzy commented Aug 28, 2020

Copy link
Copy Markdown
Collaborator Author

/test @feast-ci-bot
test-end-to-end-redis-cluster

@mrzzy

mrzzy commented Aug 28, 2020

Copy link
Copy Markdown
Collaborator Author

/test test-end-to-end-redis-cluster

@feast-ci-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrzzy, woop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@woop

woop commented Aug 31, 2020

Copy link
Copy Markdown
Member

/lgtm

@feast-ci-bot
feast-ci-bot merged commit b61c3a1 into feast-dev:master Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved compat/breaking Breaking user-facing change kind/feature New feature or request lgtm size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants