-
Notifications
You must be signed in to change notification settings - Fork 66
feat: apiml Spring-Modulith based module with ZAAS service #4108
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
base: v3.x.x
Are you sure you want to change the base?
Conversation
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
…nto reboot/modulith
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: sj895092 <[email protected]>
Signed-off-by: sj895092 <[email protected]>
Signed-off-by: Pavel Jareš <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
private final Reason reason; | ||
|
||
public AccessTokenBodyNotValidException(Reason reason) { | ||
super(reason.getMessageKey()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace this with a human-readable message? Actually, the exception is never thrown. It is maybe a question of whether we need it. Maybe calling a method that just generates a message is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@achmelo is on this one I think
apiml/src/main/java/org/zowe/apiml/controller/IncorrectPassTicketRequestBodyException.java
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/controller/InvalidWebFingerConfigurationException.java
Outdated
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/controller/ReactiveAuthenticationController.java
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/controller/ReactiveAuthenticationController.java
Outdated
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/controller/ReactiveAuthenticationController.java
Outdated
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/controller/ReactiveOIDCController.java
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/controller/ReactivePATController.java
Show resolved
Hide resolved
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
… bean annotation Signed-off-by: Andrea Tabone <[email protected]>
Signed-off-by: Andrea Tabone <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
.map(SecurityContext::getAuthentication) | ||
.filter(Objects::nonNull) | ||
.filter(Authentication::isAuthenticated) | ||
.filter(TokenAuthentication.class::isInstance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not true (ie. x509), what is the response? 404 because of Mono.empty
? Do we really need to define the type of authentication? Method `getPrincipal is everywhere, so I consider it redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from the original implementation in zaas-service's SuccessfulTicketHandler
I believe the /ticket endpoint doesn't have user mapping x509 authentication supported, it only has certificate like /eureka/** endpoints do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to add suppot for the additional method we should probably create a feature
apiml/src/main/java/org/zowe/apiml/controller/ReactivePublicJWKController.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrea Tabone <[email protected]>
apiml/src/main/java/org/zowe/apiml/controller/SafAccessDeniedException.java
Show resolved
Hide resolved
apiml/src/main/java/org/zowe/apiml/filter/BasicLoginFilter.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Pablo Carle <[email protected]>
new X509Certificate[]{clientCertFromHeader.get()}, | ||
certificateForClientAuth | ||
); | ||
exchange.getAttributes().put(ATTR_NAME_CLIENT_AUTH_X509_CERTIFICATE, clientAuthCerts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are in the WebFlux we should mainly focus on SslInfo and replace it like here:
api-layer/gateway-service/src/main/java/org/zowe/apiml/gateway/attls/AttlsHttpHandler.java
Lines 105 to 106 in 2ce6e5b
var sslInfo = AttlsSslInfo.builder().peerCertificates(certs).build(); | |
return request.mutate().sslInfo(sslInfo).build(); |
The attributes look more-less like back-compatibility with Servlets, but do not forget these attributes are not the same as on the request level (see https://github.com/zowe/api-layer/blob/2ce6e5bb44f5862a1fe91a6a4cd8398aff6f7a08/gateway-service/src/main/java/org/zowe/apiml/gateway/filters/RequestAttributesProvider.java).
I am not sure if this is the best way to handle client certificates now. Maybe we should think about a custom implementation of SslInfo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of ignorance here, you are claiming they are not the same, however by tests it seems they are set. Can you explain the differences? What are the pitfalls of the current implementation?
Signed-off-by: ac892247 <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
Signed-off-by: Pablo Carle <[email protected]>
|
Description
Include ZAAS service as part of Spring Modulith API ML module.
Linked to # (issue)
Part of the # (epic)
Type of change
Checklist: