Enable OAuth with CAS - Service Registry creation problem

31 views
Skip to first unread message

Manuel M.

unread,
Aug 21, 2018, 11:05:19 AM8/21/18
to CAS Community
Hello,

I'm trying to use CAS 5.3.x as an OAuth Authorization Server but right now i think i'm stuck to the client registration.
I tried to add a JSON Service Registry with the configuration "cas.serviceRegistry.json.location=file:/etc/cas/services" and "cas.serviceRegistry.initFromJson=false" as i've seen here in the blog under "Registering Application"

I decided to use Cas-management-webapp to add client more easly but right now i can only get "Unauthorized service" page.

I built the CAS Server from overlay on github with maven and works without problem but when i built cas-management it didn't work and i get only the page for the Unauthorized service.
I don't really know much about maven or cas so i don't really know where to look or what to look for.

Looking around i've seen that i had to add a service registry in some way so i tried editing the cas.properties and management.properties with the "cas.serviceRegistry.config.location=file:/etc/cas/services" but it didn't worked and i tried "cas.serviceRegistry.json.location=file:/etc/cas/services" with same result.



management.properties

# CAS server that management app will authenticate with
# This server will authenticate for any app (service) and you can login as casu$
cas.server.name: https://192.168.1.13:8443
cas.server.prefix: https://192.168.1.13:8443/cas

cas.mgmt.adminRoles[0]=ROLE_ADMIN
cas.mgmt.userPropertiesFile=file:/etc/cas/config/users.properties

# Update this URL to point at server running this management app
cas.mgmt.serverName=https://192.168.1.13:8443

server.context-path=/cas-management
server.port=8443

logging.config=file:/etc/cas/config/log4j2-management.xml
cas.serviceRegistry.initFromJson=true
cas.serviceRegistry.json.location=file:/etc/cas/services
 
cas.properties
cas.server.name: https://192.168.1.13:8443
cas.server.prefix: https://192.168.1.13:8443/cas

cas.adminPagesSecurity.ip=127\.0\.0\.1

logging.config: file:/etc/cas/config/log4j2.xml

cas.serviceRegistry.initFormJson=true
cas.serviceRegistry.json.location=file:/etc/cas/services

pom.xml of cas server is the 5.3.x default with this dependancy added to it

                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-oauth-webflow</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-openid-webflow</artifactId>
                    <version>${cas.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.apereo.cas</groupId>
                    <artifactId>cas-server-support-json-service-registry</artif$
                    <version>${cas.version}</version>
                </dependency>

pom.xml of cas management is the default one on github.

I'm using a VM with ubuntu server 16.04 with tomcat 8.5.32.
If you need some other information just ask.

Thank You.
Reply all
Reply to author
Forward
0 new messages