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

Setting created_by/updated_by via header #300

Merged
merged 4 commits into from
Nov 7, 2019

Conversation

pacoguzman
Copy link
Contributor

Description

Provide two new configuration settings:

  • AuthProxyEnabled to enable retrieving a header to be used on created_by/updated_by
  • AuthProxyHeader header to use defaults to X-Email

Motivation and Context

Required at #297

How Has This Been Tested?

Added unit test to ensure this works as expected

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@pacoguzman
Copy link
Contributor Author

We had this changes in place for sometime now and they work just fine. We set up flagr UI behind an oauth_proxy instance hat forward the X-Email to Flagr

pkg/config/env.go Outdated Show resolved Hide resolved
pkg/handler/subject_test.go Show resolved Hide resolved
pkg/handler/subject_test.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Oct 31, 2019

Codecov Report

Merging #300 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #300      +/-   ##
==========================================
+ Coverage    81.8%   81.83%   +0.03%     
==========================================
  Files          26       26              
  Lines        1533     1536       +3     
==========================================
+ Hits         1254     1257       +3     
  Misses        210      210              
  Partials       69       69
Impacted Files Coverage Δ
pkg/handler/subject.go 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2668d5c...f805e13. Read the comment docs.

@pacoguzman
Copy link
Contributor Author

@zhouzhuojie I've applied the feedback ready to review

pkg/config/env.go Outdated Show resolved Hide resolved
@pacoguzman
Copy link
Contributor Author

Copy link
Collaborator

@zhouzhuojie zhouzhuojie left a comment

Choose a reason for hiding this comment

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

lgtm, left one comment

@pacoguzman
Copy link
Contributor Author

Thanks, I've applied the suggetion

@zhouzhuojie zhouzhuojie merged commit a93e224 into openflagr:master Nov 7, 2019
@pacoguzman
Copy link
Contributor Author

Thanks!

@pacoguzman pacoguzman deleted the 297-auth-header branch November 7, 2019 20:24
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.

3 participants