Я настраиваю сервер CAS и пытаюсь использовать AWS Cognito в качестве обработчика авторизации. Запросы Cognito возвращают 200, показывая, что CAS попытался войти в Cognito и успешно. Тем не менее я получаю сообщение об ошибке аутентификации в журналах CAS, даже если запрос AWS был успешным.
Это мой файл конфигурации:
cas.server.name=https://localhost:8443
cas.server.prefix=${cas.server.name}/cas
logging.config: file:/etc/cas/config/log4j2.xml
cas.serviceRegistry.json.location: file:/etc/cas/services-repo
cas.serviceRegistry.initFromJson: true
cas.authn.accept.users=
cas.authn.cognito.name=COGNITO
cas.authn.cognito.order=1
cas.authn.cognito.clientId=<client id>
cas.authn.cognito.userPoolId=<user pool id>
cas.authn.cognito.credentialAccessKey=<access key>
cas.authn.cognito.credentialSecretKey=<secret key>
cas.authn.policy.req.tryAll=false
cas.authn.policy.req.handlerName=COGNITO
cas.authn.policy.req.enabled=true
Похоже, что запрос AWS Cognito выполнен успешно, но CAS по-прежнему отображает следующую ошибку:
15:37:29.605 [QUIET] [system.out] 2019-06-10 15:37:29,605 DEBUG [com.amazonaws.request] - <Received successful response: 200, AWS Request ID: a7cdc8b9-8b95-11e9-a25d-0db9186f3709>
15:37:29.605 [QUIET] [system.out] 2019-06-10 15:37:29,606 DEBUG [com.amazonaws.requestId] - <x-amzn-RequestId: a7cdc8b9-8b95-11e9-a25d-0db9186f3709>
15:37:29.610 [QUIET] [system.out] 2019-06-10 15:37:29,609 ERROR [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Authentication has failed. Credentials may be incorrect or CAS cannot find authentication handler that supports [UsernamePasswordCredential(username=<username>, source=null)] of type [UsernamePasswordCredential]. Examine the configuration to ensure a method of authentication is defined and analyze CAS logs at DEBUG level to trace the authentication event.>