You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/06/03 14:52:09 UTC
[GitHub] [brooklyn-server] duncangrant opened a new pull request #1180: Fix login form
duncangrant opened a new pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180
Logout was not redirecting correctly. This adds a header to the
login form to the 401 api response so that it can be a) ignored by the
cli and b) followed by the api.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] ahgittin commented on pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
ahgittin commented on pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180#issuecomment-853934504
merging
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] algairim commented on pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
algairim commented on pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180#issuecomment-853932976
Looks ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] ahgittin commented on a change in pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180#discussion_r644866590
##########
File path: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java
##########
@@ -71,6 +74,11 @@ public void filter(ContainerRequestContext requestContext) throws IOException {
rin = Response.status(Status.UNAUTHORIZED).entity("Authentication is required").build();
}
}
+ if (rin.getStatus()==Status.UNAUTHORIZED.getStatusCode() &&
+ Strings.isNonBlank(mgmt.getConfig().getConfig(BrooklynSecurityProviderFilterJavax.LOGIN_FORM))) {
+ rin = Response.status(Status.UNAUTHORIZED).entity("Authentication is required").header(LOGIN_PAGE_HEADER, mgmt.getConfig().getConfig(BrooklynSecurityProviderFilterJavax.LOGIN_FORM)).build();
Review comment:
maybe cleaner if we make `rin` the `ResponseBuilder` and `build()` it when we return? though the builder API might not support that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] algairim commented on pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
algairim commented on pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180#issuecomment-853932976
Looks ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] ahgittin commented on pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
ahgittin commented on pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180#issuecomment-853934504
merging
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] ahgittin commented on a change in pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
ahgittin commented on a change in pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180#discussion_r644866590
##########
File path: rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/BrooklynSecurityProviderFilterJersey.java
##########
@@ -71,6 +74,11 @@ public void filter(ContainerRequestContext requestContext) throws IOException {
rin = Response.status(Status.UNAUTHORIZED).entity("Authentication is required").build();
}
}
+ if (rin.getStatus()==Status.UNAUTHORIZED.getStatusCode() &&
+ Strings.isNonBlank(mgmt.getConfig().getConfig(BrooklynSecurityProviderFilterJavax.LOGIN_FORM))) {
+ rin = Response.status(Status.UNAUTHORIZED).entity("Authentication is required").header(LOGIN_PAGE_HEADER, mgmt.getConfig().getConfig(BrooklynSecurityProviderFilterJavax.LOGIN_FORM)).build();
Review comment:
maybe cleaner if we make `rin` the `ResponseBuilder` and `build()` it when we return? though the builder API might not support that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] asfgit closed pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [brooklyn-server] asfgit closed pull request #1180: Fix login form
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #1180:
URL: https://github.com/apache/brooklyn-server/pull/1180
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org