Registering application ( cas overlay template v 6.2)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Registering application ( cas overlay template v 6.2)

Ruhith Udakara
hi guys,

i'm pretty new to this and i install CAS server and it's now successfully login with default username and password. and i registered a test application as this tutorial.and i created a service folder and json file

this is my cas.properties file

cas.server.name=https://cas.example.org:8443
cas.server.prefix=${cas.server.name}/cas

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

cas.authn.ldap[0].principalAttributeList=sn,cn:commonName,givenName,eduPersonTargettedId:SOME_IDENTIFIER

cas.authn.ldap[0].collectDnAttribute=false
cas.authn.ldap[0].principalDnAttributeName=principalLdapDn
cas.authn.ldap[0].allowMultiplePrincipalAttributeValues=true
cas.authn.ldap[0].allowMissingPrincipalAttributeValue=true
cas.authn.ldap[0].credentialCriteria=

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

this is my json file inside the service direactory

{
   
"@class" : "org.apereo.cas.services.RegexRegisteredService",
   
"serviceId" : "https://app.example.org",
   
"name" : "ApplicationName",
   
"id" : 1001,
   
"evaluationOrder" : 10
 
}

 

this is my build.gradle file

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        maven { url "https://repo.spring.io/libs-milestone" }
        maven { url "https://repo.spring.io/libs-snapshot" }
        maven { url "https://plugins.gradle.org/m2/" }
    }
    dependencies {
        classpath "de.undercouch:gradle-download-task:${project.gradleDownloadTaskVersion}"
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${project.springBootVersion}"
        classpath "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:${project.jibVersion}"
        classpath "io.freefair.gradle:maven-plugin:${project.gradleMavenPluginVersion}"
    }
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
    maven { url "https://repo.spring.io/milestone/" }
    maven { url "https://repo.spring.io/snapshot/" }
    maven { url "https://oss.jfrog.org/artifactory/oss-snapshot-local" }
}

def casServerVersion = project.'cas.version'
def casWebApplicationBinaryName = "cas.war"

project.ext."casServerVersion" = casServerVersion
project.ext."casWebApplicationBinaryName" = casWebApplicationBinaryName

apply plugin: "io.freefair.war-overlay"
apply from: rootProject.file("gradle/tasks.gradle")

apply plugin: "war"
apply plugin: "eclipse"
apply plugin: "idea"

apply from: rootProject.file("gradle/springboot.gradle")
apply from: rootProject.file("gradle/dockerjib.gradle")

dependencies {
    // Other CAS dependencies/modules may be listed here...
    compile "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"
    compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
}

tasks.findByName("jibDockerBuild")
    .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
    .finalizedBy(deleteWebAppFromJib)

tasks.findByName("jib")
    .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
    .finalizedBy(deleteWebAppFromJib)
    
configurations.all {
    resolutionStrategy {
        cacheChangingModulesFor 0, "seconds"
        cacheDynamicVersionsFor 0, "seconds"

        preferProjectModules()

        def failIfConflict = project.hasProperty("failOnVersionConflict") && Boolean.valueOf(project.getProperty("failOnVersionConflict"))
        if (failIfConflict) {
            failOnVersionConflict()
        }
    }
}

eclipse {
    classpath {
       downloadSources = true
       downloadJavadoc = true
    }
}

idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

bootWar {
    entryCompression = ZipEntryCompression.STORED
    overlays {
        // https://docs.freefair.io/gradle-plugins/current/reference/#_io_freefair_war_overlay
        // Note: The "excludes" property is only for files in the war dependency.
        // If a jar is excluded from the war, it could be brought back into the final war as a dependency
        // of non-war dependencies. Those should be excluded via normal gradle dependency exclusions.
        cas {
            from "org.apereo.cas:cas-server-webapp${project.appServer}:${casServerVersion}@war"
            provided = false
            //excludes = ["WEB-INF/lib/somejar-1.0*"]
        }
    }
}


wrapper {
    distributionType = Wrapper.DistributionType.BIN
    gradleVersion = "${project.gradleVersion}"
}



when i trying to access https://localhost:8443/cas/login?service=https://app.example.org

i'm getting this error

CAS.PNG

what did i missed here?please point me to right direction that would be a big help

--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/9c5aa5e9-3f28-4e11-a926-58cb5ff583cb%40apereo.org.
Reply | Threaded
Open this post in threaded view
|

Re: Registering application ( cas overlay template v 6.2)

Jakub Fridrich
Hi,
You can try replace line in buildgradle with

compile "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"

instead of
compile "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"




Dne úterý 26. listopadu 2019 7:18:39 UTC+1 Ruhith Udakara napsal(a):
hi guys,

i'm pretty new to this and i install CAS server and it's now successfully login with default username and password. and i registered a test application as <a href="https://apereo.github.io/2018/06/09/cas53-gettingstarted-overlay/#registering-applications" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapereo.github.io%2F2018%2F06%2F09%2Fcas53-gettingstarted-overlay%2F%23registering-applications\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGThrDPuqTEGNucd5H2nFNpJhgqpw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapereo.github.io%2F2018%2F06%2F09%2Fcas53-gettingstarted-overlay%2F%23registering-applications\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGThrDPuqTEGNucd5H2nFNpJhgqpw&#39;;return true;">this tutorial.and i created a service folder and json file

this is my cas.properties file

<a href="http://cas.server.name" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;">cas.server.name=<a href="https://cas.example.org:8443" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcas.example.org%3A8443\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEK9gWFI8Ie0RI-7km0FFmfE9b-dw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcas.example.org%3A8443\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEK9gWFI8Ie0RI-7km0FFmfE9b-dw&#39;;return true;">https://cas.example.org:8443
cas.server.prefix=${<a href="http://cas.server.name" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;">cas.server.name}/cas

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

cas.authn.ldap[0].principalAttributeList=sn,cn:commonName,givenName,eduPersonTargettedId:SOME_IDENTIFIER

cas.authn.ldap[0].collectDnAttribute=false
cas.authn.ldap[0].principalDnAttributeName=principalLdapDn
cas.authn.ldap[0].allowMultiplePrincipalAttributeValues=true
cas.authn.ldap[0].allowMissingPrincipalAttributeValue=true
cas.authn.ldap[0].credentialCriteria=

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

this is my json file inside the service direactory

{
   
"@class" : "org.apereo.cas.services.RegexRegisteredService",
   
"serviceId" : "<a href="https://app.example.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxb0tC3tkrGOdAuePTGoR75ZPsBA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxb0tC3tkrGOdAuePTGoR75ZPsBA&#39;;return true;">https://app.example.org",
   
"name" : "ApplicationName",
   
"id" : 1001,
   
"evaluationOrder" : 10
 
}

 

this is my build.gradle file

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        maven { url "<a href="https://repo.spring.io/libs-milestone" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-milestone\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfsyiUl2NvehbimNlHITAmvJk01A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-milestone\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfsyiUl2NvehbimNlHITAmvJk01A&#39;;return true;">https://repo.spring.io/libs-milestone" }
        maven { url "<a href="https://repo.spring.io/libs-snapshot" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-snapshot\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUD5DUc9Nl4Up1iPTTLpFD2bTS3Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-snapshot\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUD5DUc9Nl4Up1iPTTLpFD2bTS3Q&#39;;return true;">https://repo.spring.io/libs-snapshot" }
        maven { url "<a href="https://plugins.gradle.org/m2/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.gradle.org%2Fm2%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCoPb9_hfZJFYzx3XWhm1xskaRvw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.gradle.org%2Fm2%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCoPb9_hfZJFYzx3XWhm1xskaRvw&#39;;return true;">https://plugins.gradle.org/m2/" }
    }
    dependencies {
        classpath "de.undercouch:gradle-download-task:${project.gradleDownloadTaskVersion}"
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${project.springBootVersion}"
        classpath "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:${project.jibVersion}"
        classpath "io.freefair.gradle:maven-plugin:${project.gradleMavenPluginVersion}"
    }
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
    maven { url "<a href="https://oss.sonatype.org/content/repositories/snapshots" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1ZZwCQETyq4eyLn7b7QP-ypp-lA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1ZZwCQETyq4eyLn7b7QP-ypp-lA&#39;;return true;">https://oss.sonatype.org/content/repositories/snapshots" }
    maven { url "<a href="https://build.shibboleth.net/nexus/content/repositories/releases/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuild.shibboleth.net%2Fnexus%2Fcontent%2Frepositories%2Freleases%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrDoKdqRNwAePIQU6E-pKDwWWhhQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuild.shibboleth.net%2Fnexus%2Fcontent%2Frepositories%2Freleases%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrDoKdqRNwAePIQU6E-pKDwWWhhQ&#39;;return true;">https://build.shibboleth.net/nexus/content/repositories/releases/" }
    maven { url "<a href="https://repo.spring.io/milestone/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fmilestone%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEc8XlOyYTunuBQIDhwpLoc4rj6iQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fmilestone%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEc8XlOyYTunuBQIDhwpLoc4rj6iQ&#39;;return true;">https://repo.spring.io/milestone/" }
    maven { url "<a href="https://repo.spring.io/snapshot/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fsnapshot%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFDi9Fap7jKmKvd57kxF17fEIb-UA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fsnapshot%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFDi9Fap7jKmKvd57kxF17fEIb-UA&#39;;return true;">https://repo.spring.io/snapshot/" }
    maven { url "<a href="https://oss.jfrog.org/artifactory/oss-snapshot-local" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.jfrog.org%2Fartifactory%2Foss-snapshot-local\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVstQYARliuza9cUbsB68N7zjrgQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.jfrog.org%2Fartifactory%2Foss-snapshot-local\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVstQYARliuza9cUbsB68N7zjrgQ&#39;;return true;">https://oss.jfrog.org/artifactory/oss-snapshot-local" }
}

def casServerVersion = project.'cas.version'
def casWebApplicationBinaryName = "cas.war"

project.ext."casServerVersion" = casServerVersion
project.ext."casWebApplicationBinaryName" = casWebApplicationBinaryName

apply plugin: "io.freefair.war-overlay"
apply from: rootProject.file("gradle/tasks.gradle")

apply plugin: "war"
apply plugin: "eclipse"
apply plugin: "idea"

apply from: rootProject.file("gradle/springboot.gradle")
apply from: rootProject.file("gradle/dockerjib.gradle")

dependencies {
    // Other CAS dependencies/modules may be listed here...
    compile "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"
    compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
}

tasks.findByName("jibDockerBuild")
    .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
    .finalizedBy(deleteWebAppFromJib)

tasks.findByName("jib")
    .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
    .finalizedBy(deleteWebAppFromJib)
    
configurations.all {
    resolutionStrategy {
        cacheChangingModulesFor 0, "seconds"
        cacheDynamicVersionsFor 0, "seconds"

        preferProjectModules()

        def failIfConflict = project.hasProperty("failOnVersionConflict") && Boolean.valueOf(project.getProperty("failOnVersionConflict"))
        if (failIfConflict) {
            failOnVersionConflict()
        }
    }
}

eclipse {
    classpath {
       downloadSources = true
       downloadJavadoc = true
    }
}

idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

bootWar {
    entryCompression = ZipEntryCompression.STORED
    overlays {
        // <a href="https://docs.freefair.io/gradle-plugins/current/reference/#_io_freefair_war_overlay" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.freefair.io%2Fgradle-plugins%2Fcurrent%2Freference%2F%23_io_freefair_war_overlay\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHifFSelZSqIykIVKiUXVAlqKQGAg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.freefair.io%2Fgradle-plugins%2Fcurrent%2Freference%2F%23_io_freefair_war_overlay\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHifFSelZSqIykIVKiUXVAlqKQGAg&#39;;return true;">https://docs.freefair.io/gradle-plugins/current/reference/#_io_freefair_war_overlay
        // Note: The "excludes" property is only for files in the war dependency.
        // If a jar is excluded from the war, it could be brought back into the final war as a dependency
        // of non-war dependencies. Those should be excluded via normal gradle dependency exclusions.
        cas {
            from "org.apereo.cas:cas-server-webapp${project.appServer}:${casServerVersion}@war"
            provided = false
            //excludes = ["WEB-INF/lib/somejar-1.0*"]
        }
    }
}


wrapper {
    distributionType = Wrapper.DistributionType.BIN
    gradleVersion = "${project.gradleVersion}"
}



when i trying to access <a href="https://localhost:8443/cas/login?service=https://app.example.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Flocalhost%3A8443%2Fcas%2Flogin%3Fservice%3Dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3MOe-TzACqbwf3fsqh5aI89FA5g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Flocalhost%3A8443%2Fcas%2Flogin%3Fservice%3Dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3MOe-TzACqbwf3fsqh5aI89FA5g&#39;;return true;">https://localhost:8443/cas/login?service=https://app.example.org

i'm getting this error

CAS.PNG

what did i missed here?please point me to right direction that would be a big help

--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/fa6cae0e-7323-441e-bb95-1ac63ca01c3b%40apereo.org.
Reply | Threaded
Open this post in threaded view
|

Re: Registering application ( cas overlay template v 6.2)

Ruhith Udakara
hi,

thanks for the reply,but that didn't worked.

On Tuesday, November 26, 2019 at 2:00:17 PM UTC+5:30, Jakub Fridrich wrote:
Hi,
You can try replace line in buildgradle with

compile "org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"

instead of
compile "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"




Dne úterý 26. listopadu 2019 7:18:39 UTC+1 Ruhith Udakara napsal(a):
hi guys,

i'm pretty new to this and i install CAS server and it's now successfully login with default username and password. and i registered a test application as <a href="https://apereo.github.io/2018/06/09/cas53-gettingstarted-overlay/#registering-applications" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapereo.github.io%2F2018%2F06%2F09%2Fcas53-gettingstarted-overlay%2F%23registering-applications\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGThrDPuqTEGNucd5H2nFNpJhgqpw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapereo.github.io%2F2018%2F06%2F09%2Fcas53-gettingstarted-overlay%2F%23registering-applications\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGThrDPuqTEGNucd5H2nFNpJhgqpw&#39;;return true;">this tutorial.and i created a service folder and json file

this is my cas.properties file

<a href="http://cas.server.name" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;">cas.server.name=<a href="https://cas.example.org:8443" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcas.example.org%3A8443\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEK9gWFI8Ie0RI-7km0FFmfE9b-dw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcas.example.org%3A8443\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEK9gWFI8Ie0RI-7km0FFmfE9b-dw&#39;;return true;">https://cas.example.org:8443
cas.server.prefix=${<a href="http://cas.server.name" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcas.server.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVbk9n7bqOgwmPMZyPAwsc5gWqWA&#39;;return true;">cas.server.name}/cas

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

cas.authn.ldap[0].principalAttributeList=sn,cn:commonName,givenName,eduPersonTargettedId:SOME_IDENTIFIER

cas.authn.ldap[0].collectDnAttribute=false
cas.authn.ldap[0].principalDnAttributeName=principalLdapDn
cas.authn.ldap[0].allowMultiplePrincipalAttributeValues=true
cas.authn.ldap[0].allowMissingPrincipalAttributeValue=true
cas.authn.ldap[0].credentialCriteria=

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

this is my json file inside the service direactory

{
   
"@class" : "org.apereo.cas.services.RegexRegisteredService",
   
"serviceId" : "<a href="https://app.example.org" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxb0tC3tkrGOdAuePTGoR75ZPsBA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxb0tC3tkrGOdAuePTGoR75ZPsBA&#39;;return true;">https://app.example.org",
   
"name" : "ApplicationName",
   
"id" : 1001,
   
"evaluationOrder" : 10
 
}

 

this is my build.gradle file

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        maven { url "<a href="https://repo.spring.io/libs-milestone" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-milestone\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfsyiUl2NvehbimNlHITAmvJk01A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-milestone\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfsyiUl2NvehbimNlHITAmvJk01A&#39;;return true;">https://repo.spring.io/libs-milestone" }
        maven { url "<a href="https://repo.spring.io/libs-snapshot" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-snapshot\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUD5DUc9Nl4Up1iPTTLpFD2bTS3Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Flibs-snapshot\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFUD5DUc9Nl4Up1iPTTLpFD2bTS3Q&#39;;return true;">https://repo.spring.io/libs-snapshot" }
        maven { url "<a href="https://plugins.gradle.org/m2/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.gradle.org%2Fm2%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCoPb9_hfZJFYzx3XWhm1xskaRvw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.gradle.org%2Fm2%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHCoPb9_hfZJFYzx3XWhm1xskaRvw&#39;;return true;">https://plugins.gradle.org/m2/" }
    }
    dependencies {
        classpath "de.undercouch:gradle-download-task:${project.gradleDownloadTaskVersion}"
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${project.springBootVersion}"
        classpath "gradle.plugin.com.google.cloud.tools:jib-gradle-plugin:${project.jibVersion}"
        classpath "io.freefair.gradle:maven-plugin:${project.gradleMavenPluginVersion}"
    }
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
    maven { url "<a href="https://oss.sonatype.org/content/repositories/snapshots" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1ZZwCQETyq4eyLn7b7QP-ypp-lA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.sonatype.org%2Fcontent%2Frepositories%2Fsnapshots\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1ZZwCQETyq4eyLn7b7QP-ypp-lA&#39;;return true;">https://oss.sonatype.org/content/repositories/snapshots" }
    maven { url "<a href="https://build.shibboleth.net/nexus/content/repositories/releases/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuild.shibboleth.net%2Fnexus%2Fcontent%2Frepositories%2Freleases%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrDoKdqRNwAePIQU6E-pKDwWWhhQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbuild.shibboleth.net%2Fnexus%2Fcontent%2Frepositories%2Freleases%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHrDoKdqRNwAePIQU6E-pKDwWWhhQ&#39;;return true;">https://build.shibboleth.net/nexus/content/repositories/releases/" }
    maven { url "<a href="https://repo.spring.io/milestone/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fmilestone%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEc8XlOyYTunuBQIDhwpLoc4rj6iQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fmilestone%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEc8XlOyYTunuBQIDhwpLoc4rj6iQ&#39;;return true;">https://repo.spring.io/milestone/" }
    maven { url "<a href="https://repo.spring.io/snapshot/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fsnapshot%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFDi9Fap7jKmKvd57kxF17fEIb-UA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Frepo.spring.io%2Fsnapshot%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFDi9Fap7jKmKvd57kxF17fEIb-UA&#39;;return true;">https://repo.spring.io/snapshot/" }
    maven { url "<a href="https://oss.jfrog.org/artifactory/oss-snapshot-local" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.jfrog.org%2Fartifactory%2Foss-snapshot-local\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVstQYARliuza9cUbsB68N7zjrgQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Foss.jfrog.org%2Fartifactory%2Foss-snapshot-local\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGVstQYARliuza9cUbsB68N7zjrgQ&#39;;return true;">https://oss.jfrog.org/artifactory/oss-snapshot-local" }
}

def casServerVersion = project.'cas.version'
def casWebApplicationBinaryName = "cas.war"

project.ext."casServerVersion" = casServerVersion
project.ext."casWebApplicationBinaryName" = casWebApplicationBinaryName

apply plugin: "io.freefair.war-overlay"
apply from: rootProject.file("gradle/tasks.gradle")

apply plugin: "war"
apply plugin: "eclipse"
apply plugin: "idea"

apply from: rootProject.file("gradle/springboot.gradle")
apply from: rootProject.file("gradle/dockerjib.gradle")

dependencies {
    // Other CAS dependencies/modules may be listed here...
    compile "org.apereo.cas:cas-server-support-json-service-registry:${casServerVersion}"
    compile "org.apereo.cas:cas-server-support-ldap:${project.'cas.version'}"
}

tasks.findByName("jibDockerBuild")
    .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
    .finalizedBy(deleteWebAppFromJib)

tasks.findByName("jib")
    .dependsOn(copyWebAppIntoJib, copyConfigIntoJib)
    .finalizedBy(deleteWebAppFromJib)
    
configurations.all {
    resolutionStrategy {
        cacheChangingModulesFor 0, "seconds"
        cacheDynamicVersionsFor 0, "seconds"

        preferProjectModules()

        def failIfConflict = project.hasProperty("failOnVersionConflict") && Boolean.valueOf(project.getProperty("failOnVersionConflict"))
        if (failIfConflict) {
            failOnVersionConflict()
        }
    }
}

eclipse {
    classpath {
       downloadSources = true
       downloadJavadoc = true
    }
}

idea {
    module {
        downloadJavadoc = true
        downloadSources = true
    }
}

bootWar {
    entryCompression = ZipEntryCompression.STORED
    overlays {
        // <a href="https://docs.freefair.io/gradle-plugins/current/reference/#_io_freefair_war_overlay" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.freefair.io%2Fgradle-plugins%2Fcurrent%2Freference%2F%23_io_freefair_war_overlay\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHifFSelZSqIykIVKiUXVAlqKQGAg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.freefair.io%2Fgradle-plugins%2Fcurrent%2Freference%2F%23_io_freefair_war_overlay\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHifFSelZSqIykIVKiUXVAlqKQGAg&#39;;return true;">https://docs.freefair.io/gradle-plugins/current/reference/#_io_freefair_war_overlay
        // Note: The "excludes" property is only for files in the war dependency.
        // If a jar is excluded from the war, it could be brought back into the final war as a dependency
        // of non-war dependencies. Those should be excluded via normal gradle dependency exclusions.
        cas {
            from "org.apereo.cas:cas-server-webapp${project.appServer}:${casServerVersion}@war"
            provided = false
            //excludes = ["WEB-INF/lib/somejar-1.0*"]
        }
    }
}


wrapper {
    distributionType = Wrapper.DistributionType.BIN
    gradleVersion = "${project.gradleVersion}"
}



when i trying to access <a href="https://localhost:8443/cas/login?service=https://app.example.org" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Flocalhost%3A8443%2Fcas%2Flogin%3Fservice%3Dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3MOe-TzACqbwf3fsqh5aI89FA5g&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Flocalhost%3A8443%2Fcas%2Flogin%3Fservice%3Dhttps%3A%2F%2Fapp.example.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH3MOe-TzACqbwf3fsqh5aI89FA5g&#39;;return true;">https://localhost:8443/cas/login?service=https://app.example.org

i'm getting this error

CAS.PNG

what did i missed here?please point me to right direction that would be a big help

--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/aab8a519-ba6e-44c6-a3e8-91bdd600f0e7%40apereo.org.
Reply | Threaded
Open this post in threaded view
|

Delegated authentication: problem related to the DistributedJ2ESessionStore

Julien Gribonvald

Hi folks,

This message is related to this Pull Request #4426 and #4427 in CAS 6.1.2 and 6.2 version. The PR fix is working only at first login and if all cookies are cleared after, the problem is that the JSESSIONID cookie exist again even if you logout as it's not cleared, and so It tries to retrieve the session/ticket from an older value and it link the transient service ticket to the old value.

I'm guessing if someone know a way to avoid that ? I tried to find a way to force the cookie value change but i's not really applied everywhere (as it doesn't applied before a page is viewed), or I didn't find where to do it. If someone have an idea feel free to purpose it !

On an other side I'm guessing if it's a good way to do ? I think it would be better to avoid to use a cookie as in this case the session could be retrieved on an other way. As example with SAML AuthnRequest an ID is generated and the IDP in his response provide it (attribute inResponseTo). So why not using this attribute and let to tomcat the JSESSIONID cookie ? It's an idea only. After I'm not sure if this will work in an UNSOLICITED request (I can't test it).

Any overview would be appreciated !

Thanks

Julien


--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/9a5472f5-67d6-45be-d087-5a6f8cae0cd5%40recia.fr.