When calling the REST endpoint, I´ve passed the credentials using the basic authentication header. The user:password has been encoded in Base64. My REST call is as follows:
curl -X POST \ https://localhost:8443/sso/v1/services/ \ -H 'Authorization: Basic cm9nZXJpby5iaW9uZGlAbHVpemFsYWJzLmNvbTpwYXNz' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "@class" : "org.apereo.cas.services.RegexRegisteredService", "serviceId" : "test", "name" : "test", "id" : 1, "description": "Teste" }' When calling the message in the log confirms that the user is authenticated: 2019-04-25 11:51:30,371 INFO [org.apereo.cas.authentication.PolicyBasedAuthenticationManager] - <Authenticated princi pal [[email protected]] with attributes [{}] via credentials [[UsernamePasswordCredential([email protected], source=null, customFields={})]].> 2019-04-25 11:51:30,371 INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit trail record BEGIN ============================================================= WHO: [email protected] WHAT: Supplied credentials: [UsernamePasswordCredential([email protected], source=null, customFields={})] ACTION: AUTHENTICATION_SUCCESS APPLICATION: CAS WHEN: Thu Apr 25 11:51:30 BRT 2019 CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1 SERVER IP ADDRESS: 0:0:0:0:0:0:0:1 ============================================================= CLIENT IP ADDRESS: 0:0:0:0:0:0:0:1 SERVER IP ADDRESS: 0:0:0:0:0:0:0:1 ============================================================= But I'm getting the error "Request is not authorized" in the REST client. Has someone faced this issue? Any help? Thank you very much. Best regards, Rogerio On Thursday, April 25, 2019 at 11:20:46 AM UTC-3, Rogério Biondi wrote: > > I'm facing the same issue. Does anyone figured out how to configure the > properties: > > cas.rest.attributeName= > cas.rest.attributeValue= > > > I'm using CAS version 6.0.x and authentication via jdbc/query. My > properties os cas.properties are: > > cas.authn.jdbc.query[0].sql=SELECT * FROM `users` WHERE `user`=? > cas.authn.jdbc.query[0].url=jdbc:mysql://*****:3306/db > cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver > cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQL57InnoDBDialect > cas.authn.jdbc.query[0].user=user > cas.authn.jdbc.query[0].password=**** > cas.authn.jdbc.query[0].autocommit=true > cas.authn.jdbc.query[0].fieldPassword=password > cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT > cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5 > cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8 > cas.authn.jdbc.query[0].order=0 > > Best regards, > Rogério > > > On Thursday, April 27, 2017 at 4:02:39 AM UTC-3, Yashwant Anandan wrote: >> >> Hi, >> >> I am trying to add a new service via the CAS ReST Service. I have a few >> doubts >> >> 1. What should be attributeName and attributeValue ? I have kept it as >> "skip" and "enabled.+" respectively. >> 2. I am getting "Request is not authorized" when I give a request to add >> a service. I thought it could be because of TGT, but I found that TGT is >> not the issue here. How to solve this ? >> > -- - 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/b947e897-2784-40ad-af90-d824ef49eb49%40apereo.org.
