How to Monitor Active SSO Sessions & Statistics

135 views
Skip to first unread message

dg

unread,
Jun 29, 2020, 9:01:33 AM6/29/20
to CAS Community
Hello, i am using 6.2.0 cas version.

i want to expose current active sso session number and staticstics by actuator api. i have searched cas blog and page (https://apereo.github.io/cas/development/monitoring/Monitoring-Statistics.htmlhttps://apereo.github.io/2018/11/06/cas6-admin-endpoints-security/), but i couldnt find a way to do that.
i just need like these apis; /actuator/ssoSessions, /actuator/statistics

i have added this dependecy to build.gradle

compile "org.apereo.cas:cas-server-support-metrics:${casServerVersion}"

then, i have added these properties to cas.properties

management.endpoints.web.exposure.include=*
management
.endpoints.enabled-by-default=true
management
.endpoint.ssoSessions.enabled=true
management
.endpoint.statistics.enabled=true
management
.endpoints.defaults.sensitive=false
cas
.monitor.endpoints.endpoint.defaults.access=ANONYMOUS

where am i missing? thanks for helps.

Moritz Mühlenhoff

unread,
Jun 30, 2020, 9:09:23 AM6/30/20
to cas-...@apereo.org
Hi,

> i want to expose current active sso session number and staticstics by actuator api. i have searched cas blog and page (https://apereo.github.io/cas/development/monitoring/Monitoring-Statistics.html, https://apereo.github.io/2018/11/06/cas6-admin-endpoints-security/), but i couldnt find a way to do that.
> i just need like these apis; /actuator/ssoSessions, /actuator/statistics
>
> i have added this dependecy to build.gradle
>
> compile "org.apereo.cas:cas-server-support-metrics:${casServerVersion}"

We're running a 6.1 setup with the ssoSessions actuator, try enabling

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

in the Gradle build.

Cheers,
Moritz

dg

unread,
Jul 1, 2020, 7:54:40 AM7/1/20
to CAS Community
hey, thanks for response. i set up cas version to 6.1.0 . but still i cannot access localhost:8443/cas/actuator/ssoSessions or localhost.8443/cas/actuator/statistics. because it cannot be found.

can you share your configurations please?

30 Haziran 2020 Salı 16:09:23 UTC+3 tarihinde Moritz Mühlenhoff yazdı:

Moritz Mühlenhoff

unread,
Jul 1, 2020, 8:46:06 AM7/1/20
to cas-...@apereo.org
Hi,

> hey, thanks for response. i set up cas version to 6.1.0 . but still i cannot access localhost:8443/cas/actuator/ssoSessions or localhost.8443/cas/actuator/statistics. because it cannot be found.
>
> can you share your configurations please?

Sure, see below for the relevant parts of our config:

Cheers,
Moritz

management.endpoints.web.exposure.include=prometheus,sso,ssoSessions
management.endpoint.sso.enabled=true
management.endpoint.ssoSessions.enabled=true

# This only returns a result for a session of an authenticated
# users, so the lack of access control doesn't leak anything
# AUTHENTICATED would be better fit, but it seems broken; it
# redirects to a non-existing /adminlogin URL instead of the
# IDP login page
cas.monitor.endpoints.endpoint.sso.access=ANONYMOUS

cas.monitor.endpoints.endpoint.ssoSessions.access=IP_ADDRESS
cas.monitor.endpoints.endpoint.ssoSessions.requiredIpAddresses=::1,127.0.0.1,208.80.153.23,208.80.154.26,2620::860:1:208:80:153:23,2620::861:1:208:80:154:26

dg

unread,
Jul 1, 2020, 9:17:04 AM7/1/20
to CAS Community
Moritz, thank you so much for helps. i ignored dependency name in your first answer(cas-server-support-reports), considering that i had already added it (but i had just added cas-server-support-metrics).

when i add and configure like you, it works. thank you again.

1 Temmuz 2020 Çarşamba 15:46:06 UTC+3 tarihinde Moritz Mühlenhoff yazdı:
Reply all
Reply to author
Forward
0 new messages