Here is the problem:
I want to let services call /ticket endpoint via REST. But I got following
error even my service is registered (from
RegisteredServiceAccessStrategyUtils):
Unauthorized Service Access. Service [%s] is not found in service registry.
*When I debug I see that when I call /ticket endpoint this function is
triggered (in JWTBuilder):*
public String build(final TicketGrantingTicket ticketGrantingTicket) {
....
val request = builder.serviceAudience(jwtBuilder.getCasSeverPrefix())
....
which is using casServerPrefix as a serviceAudience. Than following code is run:
val registeredService = payload.getRegisteredService() == null
? locateRegisteredService(serviceAudience)
: payload.getRegisteredService();
whihc tries to find given audience in the service registry. And since I don't
have any service matches with "http://cas:8080/cas" in my registry it throws
the error in the above. Than I checked how it is working when I call /ticket
via login:
than this function is triggered (in JWTBuilder):
public String build(final String serviceTicketId, final Service service) {
...
val request = builder
.serviceAudience(service.getId())
...
which registers requested service as auidence which is fine because than
registeredService will be found in following requests. So where is the problem?
Do I miss somewhere that needs to register my CAS to the registry?
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/97cf51bc-78b0-42a4-b41f-94cc1e5b36a2%40apereo.org.