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

Allow an admin user to specify a delegated user. #931

Closed
wants to merge 4 commits into from

Conversation

peichman-umd
Copy link
Contributor

The delegation is specified in an HTTP Header. The header is configured using a separate HttpHeaderPrincipalProvider bean named delegatedPrincipalProvider. If it is configured and a matching header is present in the request, the ServletContainerAuthenticationProvider will replace the userPrincipal in the request with the first principal found in the header.

  • Added a getFirstPrincipal() convenience method to the HttpHeaderPrincipalProvider.
  • Added unit tests for the delegated user functionality of the ServletContainerAuthenticationProvider. Check that admins can delegate but regular users cannot.
  • Added unit test for the getFirstPrincipal method of HttpHeaderPrincipalProvider.
  • Added an integration test with an On-Behalf-Of header and a mock FAD.

Resolves: https://jira.duraspace.org/browse/FCREPO-1790

The delegation is specified in an HTTP Header. The header is configured using a separate HttpHeaderPrincipalProvider bean named delegatedPrincipalProvider. If it is configured and a matching header is present in the request, the ServletContainerAuthenticationProvider will replace the userPrincipal in the request with the first principal found in the header.

- Added a getFirstPrincipal() convenience method to the HttpHeaderPrincipalProvider.
- Added unit tests for the delegated user functionality of the ServletContainerAuthenticationProvider. Check that admins can delegate but regular users cannot.
- Added unit test for the getFirstPrincipal method of HttpHeaderPrincipalProvider.
- Added an integration test with an On-Behalf-Of header and a mock FAD.

Resolves: https://jira.duraspace.org/browse/FCREPO-1790
@@ -39,7 +39,7 @@
* @author Gregory Jansen
*/
public final class ServletContainerAuthenticationProvider implements
AuthenticationProvider {
AuthenticationProvider {
Copy link

Choose a reason for hiding this comment

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

rollback formatting change

@peichman-umd
Copy link
Contributor Author

Needed by fcrepo4/fcrepo-module-auth-webac#49

@awoods
Copy link

awoods commented Nov 4, 2015

Resolved with: b807b2a

@awoods awoods closed this Nov 4, 2015
@peichman-umd peichman-umd deleted the fcrepo-1790 branch November 5, 2015 14:54
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

2 participants