I followed this tutorial and completed setup, but I do not understand how do I use it in Micronaut? Please help me with the following?
- Using
io.micronaut.context.env.Environment
I can load specific certificate, but is this loaded fromX.509 Certificate
text or I should create a publi.cert file from keytool? - In okta developer console do I need to configure my application controller, so that this gets called on login, as I always get
405 Method Not Allowed
when I hit http://localhost:4200/xxx/api/sso/saml?
update
- Also, how do I make use of the above "Setup Instructions" screenshot in my micronaut application, as it says SAML 2.0 is not configured in
https://developer.okta.com
? How should the AuthenticationController be called, is it a redirect in case of UnauthorizedError to this controller with relevant SAML Response and RelayState? How do I get this SAML Response?
@Controller('/xxx/api/sso')
@Slf4j
@CompileStatic
class AuthenticationController {
private final String DEFAULT_PERSONA = "DEFAULT"
private static final Logger _authLogger = LoggerFactory.getLogger("AUTH_LOG");
@Inject UserService userService
@Value('${sso.issuer}')
String SSO_SAML_ISSUER
@Post('/saml')
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_HTML)
HttpResponse<String> samlLogin(@Nullable @Body LinkedHashMap payload) {
...
Please help me understand integrating SAML 2.0 okta authentication with micronaut application.
How do I use the "Setup Instructions" in micronaut application?