Category Archives: Blog

Log4j Remote Code Execution Vulnerability

The Future of Shibboleth SP

Log4j Remote Code Execution Vulnerability


CVE-2021-44228 is a vulnerability identified with the Apache Log4j package that is classified under the highest severity (10 out of 10). This vulnerability allows an attacker to execute arbitrary code by injecting data into a logged message.

This post is an attempt to provide an analysis of the vulnerability and a discussion of potentially affected Identity Management products.

For details from the Apache Foundation regarding the Log4j package specifically, view the CVE details here: https://logging.apache.org/log4j/2.x/security.html

Vulnerability Description

This vulnerability, known colloquially as “Log4Shell” since it provides unhindered access to execute code on the compromised machine, affects one of the most popular logging libraries in the Java ecosystem (“over three billion devices run java”).

A logger is supposed to just record details of an even to a file, database, or send it to another server to store it. But in the case of log4j, there are a few things that are performed before writing anything. One of the things it does is look for patterns like ${something} and will try to replace it with additional information, i.e. ${date} could be replaced by the date of the error.

The problematic issue is that there are messages logged including strings like:

${jndi:...

Logback tries to replace the data, invoking another mechanism that loads a resource from another computer… anywhere on the internet.

This data can be a malicious code.

Due to the nature of Java the malicious code is automatically run on the computer that used log4j, which means that at the attacker can make the targeted computer do (almost) anything. All that it takes for that code to execute is for the attacker to get the string to be logged.

If your java web server, for example, is logging what urls are accessed it could be as simple as including the malicious code in an HTTP request to the server.

Generic Mitigation Strategies

Adding log4j2.formatMsgNoLookups=true as a JVM property to any vulnerable application’s Java Virtual Machine will remediate the issue.

External mitigation is also available via a Web Application Firewall (WAF). We recommend reaching out to your WAF vendor regarding mitigation for this vulnerability, and blocking some of the known prefixes such as:

Auth0

Auth0 cloud identity services are not vulnerable. See: https://twitter.com/auth0/status/1470086301902721024


Apereo CAS

CAS versions 6.3+ is vulnerable and requires immediate mitigation. Deployers can immediately mitigate by updating to the latest versions (at the time of writing) of each branch of CAS:

6.3.x

Modify your CAS overlay to point to the version 6.3.7.2.

6.4.x

Modify your CAS overlay to point to the version 6.4.4.

Alternative Mitigation

For users that can’t upgrade, another option is to set the log4j2.formatMsgNoLookups system property to true, e.g.

java -Dlog4j2.formatMsgNoLookups=true -jar cas.war

See: https://apereo.github.io/2021/12/11/log4j-vuln/ for additional details.


F5 BigIP

F5 BigIP products themselves are not vulnerable.

F5 provides guidance for deployers of F5 load balancers to block incoming traffic asserting the problematic JNDI strings here: https://support.f5.com/csp/article/K19026212


ForgeRock

The only ForgeRock product that utilizes Log4j is Autonomous Identity. ForgeRock Autonomous Identity is vulnerable, however all other ForgeRock products are not vulnerable.

As of December 13, 2021 a patch is unavailable, and as such ForgeRock recommends using the following setting:

log4j2.formatMsgNoLookups=true

or the Java Virtual Machine running Autonomous Identity.

For further details see: https://backstage.forgerock.com/knowledge/kb/book/b21824339#a39102625


Keycloak

Keycloak is not vulnerable unless you are using JMSAppender (non-standard; if you are using JMSAppender Keycloak recommends disabling that for now).

See: keycloak/keycloak#9078


Okta

Two on-premises Okta products (RADIUS Server Agent and On-Prem MFA Agent) are vulnerable. The mitigation for these products is to update to the latest version available from the Okta admin console.

Okta cloud-based identity solutions are not vulnerable.

See: https://sec.okta.com/articles/2021/12/log4shell


PingIdentity

PingFederate, PingAccess, PingCentral and PingIntelligence are vulnerable.

Maintenance releases that permanently resolve this issue will be made available soon, however in the meantime Ping recommends to mitigate in various ways depending upon your version and product. See: https://support.pingidentity.com/s/article/Log4j2-vulnerability-CVE-CVE-2021-44228 (Note: requires account, free from here.)


Shibboleth

Identity Provider

Shibboleth Identity Provider is not vulnerable using the default configuration. Shibboleth leverages SLF4j and Logback, not Log4j. Shibboleth IDP does ship with a Log4j bridge, however, leveraging this feature would require specifically enabling the functionality.

See: http://shibboleth.net/pipermail/announce/2021-December/000253.html for information provided by Shibboleth lead developer Scott Cantor.

You can read SLF4j’s discussion of the Log4j issue here: http://slf4j.org/log4shell.html

In effect, you may be vulnerable if your specific configuration loads Log4j, so you should validate what libraries you are using for logging. Adding the startup string -Dlog4j2.formatMsgNoLookups=true to the JVM will provide protection if you are uncertain of what logging facility your server is using.

Service Provider

Shibboleth Service Provider is not vulnerable as it is not a Java-based product.


WSO2

The following WSO2 products are vulnerable:

  • WSO2 Identity Server 5.9.0 and above
  • WSO2 Identity Server Analytics 5.7.0 and above
  • WSO2 Identity Server as Key Manager 5.9.0 and above
  • WSO2 API Manager 3.0.0 and above
  • WSO2 API Manager Analytics 2.6.0 and above
  • WSO2 Enterprise Integrator 6.1.0 and above
  • WSO2 Enterprise Integrator Analytics 6.6.0 and above
  • WSO2 Micro Integrator 1.1.0 and above
  • WSO2 Micro Integrator Dashboard 4.0.0 and above
  • WSO2 Micro Integrator Monitoring Dashboard 1.1.0 and above
  • WSO2 Stream Processor 4.0.0 and above
  • WSO2 Stream Integrator 1.0.0 and above
  • WSO2 Stream Integrator Tooling 1.0.0 and above
  • WSO2 Open Banking AM 2.0.0 and above
  • WSO2 Open Banking KM 2.0.0 and above

WSO2 provides a shell script that can be executed from the application’s base directory to locate the remove/update vulnerable classes: wso2/security-tools#169

See: https://docs.wso2.com/pages/viewpage.action?pageId=180948677 for additional details.


Need help assessing a security issue? Contact us to discuss your needs. IDM Engineering is a team of dedicated, honest SSO support engineers that are standing by to help!

The Future of Shibboleth SP

The Future of Shibboleth SP

The Future of Shibboleth SP


Two days ago the Shibboleth Consortium quietly released the latest version of Shibboleth Service Provider for all platforms.

The Shibboleth Project has released a small update to the SP software, V3.3.0, and it is now available from the download site and packages for supported platforms on the mirrors.

This release, while acknowledged by the Consortium as a “small update” containing mostly small fixes and library updates, as well as a “sweep of the code to add deprecation warnings to more at risk features.”

was notable primarily for the fact that there’s a remarkable amount of commentary regarding the future of Shibboleth SP.

This includes commentary on the build process changing to move away from the OpenSUSE Build Service to a local, Docker-based process, which (according to the Consortium):

is a much faster process for us but it expands and constrains what we can support at the same time. As a result, a number of older platforms for which we have been unofficially producing packages but not supporting for some years will not see further package updates starting with this release.

The older platforms that appear to no longer be officially supported include macOS and SuSE. Meanwhile new support has been added for Amazon Linux and Rocky Linux. They go on to state that CentOS will no longer be officially supported later this year. This is due to the fact that CentOS is fundamentally changing it’s nature:

Some of this is also in response to the CentOS changes coming next year, and due to CentOS 8 no longer representing a fixed OS target, we will be dropping official support for it as of the end of this year, though it’s possible packages may still be produced for it in the future as part of our process.

Importantly, there’s also this comment regarding the future of Shibboleth SP:

Lastly, we want to note that this is probably the final minor version of the software in its current form and new features are unlikely. Attention will be shifting in 2022 and 2023 to redesigning the SP into a much smaller native footprint alongside a Java-based appliance that performs the work of shibd today. This will represent a large and likely breaking change to much of the way the SP is configured and works, so if you find that non-appealing for your needs, this is a good time to be evaluating alternatives.

A Java-based SAML SP

While it appears that there is no concrete plan at this time for the exact nature of a future “Service Provider ver. 4”, according to the design notes any such software is likely to be Java-based, so that all or most of the components that dictate the SAML- and XML-handling can be done with existing code leveraged by the Shibboleth Identity Provider.

This likely means a standalone Java appliance application that can be deployed alongside Apache, IIS, etc. in order to host the “SAML core” while minimizing the C code that’s necessary for the consortium to maintain.

According to the draft Design Notes:

there are some key requirements we probably have some consensus on that a new design would have to maintain:
1. Support for Apache 2.4 and ISS 7+, ideally in a form that leads more easily to other options in the future.
2. Support for the current very general integration strategy for applications that relies on server variables or headers.
3. Some relatively straightforward options for clustering.

which means that the new SP is likely to be largely functional for most deployers in the future as it is today.

This represents such a massive shift that those designing and building new SAML deployments may wish to avoid new deployments of Shibboleth due to the uncertain future.

Choosing a SAML Stack

That said, there’s effectively a large amount of calculus to perform when choosing the proper SAML stack, and the long-term future of a given platform is an element that’s always entered into that problem. The recent changes that’ll be occurring in the Shibboleth sphere should not be taken as the sole factor in determining whether to use or not use a given SAML stack.

Shibboleth continues to be a stable platform, in both the SP and IdP components, and we expect the new SP (when it is ultimately released) will be a good, solid choice for a service provider. It is just worth consideration of the fact that it’s likely to change in the (relatively) near future, perhaps in a major way.

As always, IDM Engineering stands ready to guide our clients toward the most stable, most cost-effective, and most easily-supported SAML solution for any given SAML stack. If you’re looking to deploy Shibboleth or another SAML implementation, and don’t want the headache of researching the nuances of choosing which stack or library to use, reach out to us today.

Assessing Attribute Release Policies with AACLI

Assessing Attribute Release Policies with AACLI


Shibboleth Identity Provider (IdP) includes an incredibly useful and powerful tool for determining, without doing an actual authentication sequence, what attributes will be released for a given user (principal) and service provider.

That tool is the Attribute Authority Command Line Interface (AACLI).

You can invoke the AACLI tool by executing a script in the terminal, i.e. {idp.home}/bin/aacli.sh (or {idp.home}/bin/aacli.bat for Windows installations):

[user @ /opt/shibboleth-idp/]$ .bin/aacli.sh -n user -r https://sp.idmengineering.com/shibbolet

If you have correctly configured Access Controls for Administrative Functions, you may access the output of the script via a special resolvertest endpoint as such:

https://localhost.idmengineering.com/idp/profile/admin/resolvertest?principal=jdoe&requester=https%3A%2F%2Fsp.example.org%2Fsp

This URL you could access via curl for use in custom scripting.

Parameters


Query Parameter Shell Flag Description
principal –principal, -n Names the user for which to simulate an attribute resolution.
requester –requester, -r Identifies the service provider for which to simulate an attribute resolution.
acsIndex –acsIndex, -i Identifies the index of an <AttributeConsumingService> element in the SP’s metadata.
saml2 –saml2 Value is ignored, if present causes the output to be encoded into a SAML 2.0
assertion.
saml1 –saml1 Value is ignored, if present causes the output to be encoded into a SAML 1.1
assertion.

Examples


Shell Script, Simple Output

[idp.idmengineering.com shibboleth-idp]# ./bin/aacli.sh -n john -r https://sp.idmengineering.com/shibboleth

Result:

{
"requester": "https://sp.idmengineering.com/shibboleth",
"principal": "john",
"attributes": [


  {
    "name": "uid",
    "values": [
              "John"          ]
  },

  {
    "name": "mail",
    "values": [
              "support@idmengineering.com"          ]
  },

  {
    "name": "sn",
    "values": [
              "Doe"          ]
  }

]
}

Shell Script, Output formatted as SAML 2.0 Assertion

[idp.idmengineering.com shibboleth-idp]# ./bin/aacli.sh -n john -r https://sp.idmengineering.com/shibboleth

Result:

<?xml version="1.0" encoding="UTF-8"?>
<saml2:Assertion ID="_057aa390d3cebb0d9c7b90524667edd1"
    IssueInstant="2020-09-18T16:20:55.242Z" Version="2.0" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
    <saml2:Issuer>https://localhost.idmengineering.com/idp/shibboleth</saml2:Issuer>
    <saml2:Subject>
        <saml2:NameID
            Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
            NameQualifier="https://localhost.idmengineering.com/idp/shibboleth" SPNameQualifier="https://sp.idmengineering.com/shibboleth">AAdzZWNyZXQx49glc8r4c80yYO2LWKJ9yHk4GV3IzMIZvBYsEKNnbmxuRfySoLSAZBu7H3OTxNzJKTPIpTJ0o2Ye9YnyMIve0at0+QWNSGz/Rjuu1PW/wvse24m40MFlYWQoWu2EDO5cmYWYUWze/jBPtuyCN0XqM6MJczyAujM=</saml2:NameID>
    </saml2:Subject>
    <saml2:AttributeStatement>
        <saml2:Attribute FriendlyName="uid"
            Name="urn:oid:0.9.2342.19200300.100.1.1" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue>John</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute FriendlyName="mail"
            Name="urn:oid:0.9.2342.19200300.100.1.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue>support@idmengineering.com</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute FriendlyName="sn" Name="urn:oid:2.5.4.4" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue>Doe</saml2:AttributeValue>
        </saml2:Attribute>
    </saml2:AttributeStatement>
</saml2:Assertion>

URL Request, Simple Output

URL: https://localhost.idmengineering.com/idp/profile/admin/resolvertest?principal=john&requester=https%3A%2F%2Fsp.idmengineering.com%2Fshibboleth

URL Request, Output formatted as SAML 2.0 Assertion

URL: https://localhost.idmengineering.com/idp/profile/admin/resolvertest?saml2&principal=john&requester=https%3A%2F%2Fsp.idmengineering.com%2Fshibboleth


Attribute Resolution Trouble?

You can use AACLI to debug issues related to attribute release… but why is a given attribute not being released? Here are some common issues:

  • The attribute isn’t being provided by a data connector. This is perhaps because the attribute is null for that principal.
  • There is no attribute definition defined for that attribute.
  • The attribute definition does not define a dependency from which to pull the source attribute (i.e. explicitly specify the attribute or say which resolver it’s from).
  • The attribute definition is marked as a dependency only attribute and thus is not released from the resolver.
  • The attribute definition does not define an encoder appropriate for the given request protocol (i.e. SAML1 encoder exists but SAML2 doesn’t).
  • The attribute is being filtered out by the attribute filter policy.

The last point, the lack of an appropriate policy releasing the attribute for a given SP in attribute-filter.xml is the most likely cause of a missing attribute, and as such should most likely be checked first.


Need help debugging an attribute issue? Contact us to discuss your needs. IDM Engineering is a team of dedicated, honest SSO support engineers that are standing by to help!

Enabling ‘Debug’ Logging in ADFS

Enabling 'Debug' Logging in ADFS

Enabling ‘Debug’ Logging in ADFS


Microsoft Active Directory Federation Services (ADFS) isn’t the simplest SAML implementation to debug. When a new service provider (“relying party”) integration isn’t working, when configuring a new identity provider (“claims provider”), or just having issues with a particular user accessing a service, there is often little-to-no useful information within the default logs. That said, it’s relatively simple to lower the logging level:

Set Trace level and Enable the ADFS Tracing Log


  1. Run command prompt as an administrator.
  2. Type the following command:
    • wevtutil set-log “AD FS Tracing/Debug” /L:5
  3. Open Event Viewer.
  4. Right-click on Application and Services Logs.
  5. Select View -> “Show Analytics and Debug Logs”
  6. Navigate to Applications and Services Logs -> AD FS Tracing –> Debug.
  7. Right-click and select “Enable Log” to start trace debugging immediately.

To stop tracing, similarly:

  1. Follow Steps 1-6 above.
  2. Right-click and select “Disable Log” to stop trace debugging. It is difficult to scroll and search in the events page by page in the debug log, so it is recommended that you save all debug events to a *.evtx file first.
  3. Open the saved log again and observe that it now includes ADFS Tracing events.

Note: Trace/Debug logs in ADFS are very chatty… and should be used with discretion, and only for the duration of troubleshooting activity, on production servers.

Enable Object Access Auditing to See Access Data


To observe detailed information about access activities on the ADFS servers you must enable object access auditing in two locations on the ADFS servers:

To Enable Auditing:

  1. On the primary ADFS server, right-click on Service.
  2. Select the Success audits and Failure audits check boxes. These settings are valid for all ADFS servers in the farm.

To modify the Local Security Policy, do the following:

  1. Right-click the Start Menu, and select ‘Run’
  2. Type gpedit.msc and select ‘OK’
  3. Navigate to Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Audit Policy
  4. In the policy list, right-click on Audit Object Access, and select ‘Properties’
  5. Select the Success and Failure check boxes. These settings have to be enabled in the Local Security Policy on each ADFS server (or in an equivalent GPO that is set in Active Directory).
  6. Click OK

Open the security event logs on the ADFS servers and search for the timestamps that correspond to any testing or troubleshooting that is being conducted.


Need help debugging an ADFS issue? Contact us to discuss your needs. IDM Engineering is a team of dedicated, honest SSO support engineers that are standing by to help!

SameSite Cookies and Shibboleth

SameSite Cookies and Shibboleth


Google Chrome v.80 is slated to be deployed to the stable channel on February 4th, 2020. (Note: some sources indicate Feb. 17th as the release target.) With this update comes a fundamental shift in the default handling of cookies within Chrome. Starting with this release, cookies will by default be treated as though they have the property SameSite=lax, instead of this property being unset.

The SameSite cookie attribute is a IETF draft written by Google Inc. which instructs the user-agent not to send the SameSite cookie during a cross-site HTTP request. The aim of the SameSite property is to help prevent certain forms of cross site request forgery. Cross-site HTTP requests are those for which the top level site (i.e. that shown in an address bar) changes during navigation.

The SameSite attribute can take three values:

  • strict – only attach cookies for ‘same-site’ requests.
  • lax – send cookies for ‘same-site’ requests, along with ‘cross-site’ top level navigations using safe HTTP methods e.g. (GET HEAD OPTIONS TRACE).
  • none – send cookies for all ‘same-site’ and ‘cross-site’ requests.

The previous behavior of the Chrome browser would be equivalent to SameSite=None.


Ramification for Shibboleth Identity Provider

Per the Shibboleth Consortium, which conducted extensive testing of the Identity Provider software:

the IdP should continue to function when its cookies are being defaulted to SameSite=Lax by browsers (currently tested on Chrome 78-81 and Firefox 72 with the same-site default flags set). Typically, we have only seen the IdP itself break when the JSESSIONID is set to SameSite=strict, which should not happen apart from when explicitly trying to set SameSite=none with older versions of Safari on MacOS <=10.14 and all WebKit browsers on iOS <=12 (Source)

They go on to list the following scenarios wherein SSO breaks, namely:

  • When using client side session storage, with htmlLocalStorage set to false, HTTP-POST SSO will not work (show login page again) with defaulted SameSite=Lax IdP cookies. However, when using client side session storage, with htmlLocalStorage set to true, and all bean references in shibboleth.ClientStorageServices are left as they are, HTTP-POST SSO will work with defaulted SameSite=Lax.
  • When using server side session storage, if either htmlLocalStorage or the bean references in shibboleth.ClientStorageServices are commented out, HTTP-POST SSO will not work (show login page again) with defaulted SameSite=Lax. Once again, however, when using sever side session storage, with htmlLocalStorage set to true, or all bean references in shibboleth.ClientStorageServices are left as they are, HTTP-POST SSO will work with defaulted SameSite=Lax.

Therefore, to take the relevant IdP-side steps necessary to guarantee SSO on existing installations of the IdP v3, you should enable the HTML Local Storage plugin whether you use client-side storage or server-side storage. This is achieved by setting the idp.storage.htmlLocalStorage property to true in idp.properties.

See the Shibboleth Wiki section re: StorageConfiguration for more information and the implications of this setting.

For more details on the Consortium’s investigatory work related to SameSite please visit this wiki page.


Ramification for Shibboleth Service Provider

Unfortunately, as noted by the Shibboleth Consortium, the bulk of the issues likely to arise within service provider deployments lie solely within the application space, and are likely outside of the Shibboleth domain.

Nor can we provide any sort of yes/no or good/bad conclusion for anybody as to whether “their system is affected”. That is going to depend entirely on the individual case and the only real answer is to test. (Source)

Effectively, SPs should really just test their systems prior to the expected launch of the SameSite changes in Chrome. You can test in either Firefox or Chrome:

Firefox

  • Enter about:config in the URL bar, Accept Risk and Continue
  • Type samesite to filter options to display: network.cookie.sameSite.laxByDefault
  • Set network.cookie.sameSite.laxByDefault to true

Chrome

  • Enter chrome://flags in URL bar
  • Type SameSite
  • Enable “SameSite by default cookies”

If your application fails to work under the test conditions, you can adjust the relevant (blocked) cookies in order to specify the SameSite=none directive. None of the cookies set by Shibboleth SP should require this directive, however, it is quite likely that you will need to adjust cookies within your application.

In particular, the notes from the Shibboleth Consortium further state that

… a typical source of problems for most applications is going to be load balancer behavior. If you’re using cookies for node affinity, you’re going to have problems with SameSite unless you do something about it.

and in particular, you should adjust your load balancer to specify SameSite=none for these affinity cookies.


Need help understanding how the SameSite cookie attribute affects your application or SSO environment? Contact us to discuss your needs. IDM Engineering is a team of dedicated, honest SSO support engineers that are standing by to help!

Configuring the CAS Management Webapp

Configuring the CAS Management Webapp

Configuring the CAS Management Webapp


This guide documents how to spin-up the CAS Management Webapp as an Apache Maven overlay. (You can do it with Gradle as well, but I prefer Maven.)

1. Pull down the repo.

mkdir /opt/cas/
git clone https://github.com/apereo/cas-management-overlay.git

You can browser the repository here: apareo/cas.

2. Edit etc/cas/config/management.properties:

— Add server names for CAS Management Webapp to authenticate, and details of the Management app itself:

cas.server.name: https://cas.example.edu
cas.server.prefix: https://cas.example.edu/cas
mgmt.serverName=https://idmutil04.kumc.edu
server.context-path=/cas-management
server.port=9443

— Add service registry. NOTE: Must be exactly what the CAS server uses, i.e. if you use the following configuration for an LDAP service registry in cas.properties on the CAS server, make sure to include this same config blob here. The following example demonstrates the LDAP Service Registry

# LDAP Service Registry
cas.serviceRegistry.ldap.ldapUrl=[REDACTED]
cas.serviceRegistry.ldap.baseDn=ou=CasTestServiceRegistry,ou=Services,o=IDVAULT
cas.serviceRegistry.ldap.bindDn=cn=casserviceregistry,ou=AuthAccounts,o=IDVAULT
cas.serviceRegistry.ldap.bindCredential=[REDACTED]
cas.serviceRegistry.ldap.serviceDefinitionAttribute=description
cas.serviceRegistry.ldap.idAttribute=uid
cas.serviceRegistry.ldap.objectClass=casRegisteredService
cas.serviceRegistry.ldap.searchFilter=(%s={0})
cas.serviceRegistry.ldap.loadFilter=(objectClass=%s)

3. Edit the pom.xml.

Include any additional dependencies you may have. For example, to include the LDAP Service Registry dependency:

<!-- LDAP Service Registry -->
<dependency>
  <groupId>org.apereo.cas</groupId>
  <artifactId>cas-server-support-ldap-service-registry</artifactId>
  <version>${cas.version}</version>
  <exclusions>
    <exclusion>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </exclusion>
  </exclusions>
</dependency>

Note that I needed to exclude the dependency’s dependency on spring-web so that it wasn’t included twice, otherwise you may get an error on startup such as this:

More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.

See: https://stackoverflow.com/questions/55177367/more-than-one-fragment-with-the-name-spring-web-was-found-in-non-maven-projec

4. Edit etc/cas/config/users.properties to add your users, i.e.

user=foo,ROLE_ADMIN

Note: The ‘foo’ is for a legacy password field, can be anything there. This is obviated if you use a JSON or YAML authorization list.

5. Build and deploy the WAR file to Tomcat:

./build.sh package
sudo install -C -m 775 -o tomcat -g root etc/cas/config/* /etc/cas/config
sudo install -C -m 775 -o tomcat -g root target/cas-management.war /opt/tomcat/webapps
sudo systemctl start tomcat

Resources:

https://apereo.github.io/cas-management/5.3.x/installation/Installing-ServicesMgmt-Webapp.html


Looking for support for CAS? Look no further! Contact us for all of you SSO support needs!

SSO Support for Busy IT Admins 5 — Managing Integrations

SSO Support for Busy IT Admins 5 — Managing Integrations

So, that’s it… you’ve been given the weighty responsibility of SSO support for your organization. Or perhaps you’re new to the IAM team. Now what?

This post is the last in five-part series on the Fundamentals of SSO Support for IT Administrators.† You can see our first post here, our second post here, our third post here, and our fourth post here.

Keeping Integrations in Order

The primary purpose for a Single Sign On environment is to central authentication, and make things simpler for your users. However, one of the items that seems to plague busy academic and enterprise environments is a highly disorganized and disjointed SSO configuration. Here are some tips for keeping your SSO integrations in order, so that it’s easier to managing being the SSO Support “guy”.

Centralize as much as possible.

Many times we see orgs that are using some combination of Shibboleth, CAS, ADFS, and OAuth all at the same time, often with different administrators for each vying for the role of being the “SSO Support Principal”. With certain exceptions, you should reduce the number of deployed SSO solutions within your org’s ecosystem to as few as possible… for example:

  • Shibboleth and ADFS are both primarily SAML-speaking IdP packages. Do you really need both? Did you know that you can delegate Shibboleth authentication to ADFS? Did you know that you can delegate ADFS authentication to Shibboleth?
  • CAS works with a proprietary protocol… but Shibboleth IdP “speaks” that protocol. Ditch CAS and get Shib!
  • But hey… CAS also “speaks” SAML… Ditch Shib and get CAS!
  • Shibboleth, CAS, and ADFS all support OIDC to one degree or another, whether with native support or third-party plugins.

Mischief Configurations Managed

Configurations get out of sort, and quickly, when:

  • more than one person edits/adds integrations to the server, or
  • you fail to follow a standard operating procedure.

To that end, we strongly mention having a formal procedure in place (and documented, see below) for when an integration is built.

This doesn’t necessarily mean that you have to use git to manage configuration files and build a review process with PRs and commits to the production repo – not that that’s a bad idea 😉 – but what it does mean is that you follow simple things like:

  • Ensure that configuration file changes are commented, with an indication of who made the change, why they made it, and when. (For example, when I’m working in an IdP config file and I make a change on a users behalf I like to comment with things like:
    <!-- IDME / 2020-01-20 / New service added. <kellen@idmengineering.com> -->
  • Make a copy of all configuration files before you make changes, and make sure they’re dated… I can’t tell you how many times I’ve seen “relying-party.xml”, “relying-party.xml.bak”, “relying-party.xml.bak2”, and “relying-party.xml.broken” all in the same config directory. Without context in the files, they’re useless.
  • Don’t be afraid of deleting extra files that come with the software packages that aren’t needed after an initial deployment… I’m looking at you and your .dist files Shibboleth.

Documentation Prevents Problems

Do you have a single, centralized list of all of your SP integrations? Does that list come along with contact info for both the local responsible party as well as the vendor? Do you have metadata and/or testing URLs readily available?

Do you have a document that you provide to integration partners that specifies what information that you expect them to provide? Don’t be afraid to be a bit demanding here. SSO is difficult. You’ll help the partner organization improve by asking them to stick to standards and give you proper details.

Federate!

How many individual metadata files are you consuming? Can you limit the number of individual relying parties that you need to add by Federating with entities like InCommon or REFEDs.


Thanks for joining us!

Just following SOME of these tips will make your life managing an SSO support environment.  It’s been a bit of an adventure, and we hope you’ve enjoyed this series.  If you need support for your SSO environment we’re here for you. IDM Engineering is a team of dedicated, honest SSO support engineers that are readily available to help you architect a new single sign on environment, manage or improve existing SSO infrastructure, or just dig in and quickly solve a integration issue. We speak SAML… and OAuth… and ADFS… and SimpleSAMLphp… and more. Furthermore, we have a carefully curated collection of technological experience and expertise that can assist you with whatever single sign-on issue you’re facing. Give us a shot! Let us know how we can help you today!

† Or — how I learned to stop worrying and love XML.

Configuring SimpleSAMLphp Logging

Configuring SimpleSAMLphp Logging


Unfortunately, the SimpleSAMLphp documentation is a bit lacking in this area, so I thought it would be useful to document how to configure the various logging options with SimpleSAMLphp. Since SSP is actively maintained, it’s worth noting that this document was prepared with SimpleSAMLphp 1.17.7 which is likely to NOT be the latest version available, even though it is at the time this document was created.

Note: All files will be referenced with respect to $SSP_DIR which in a typical install is /var/simplesamlphp:

Logging to Files

By default, SimpleSAMLphp comes with the syslog facility enabled in $SSP_DIR/config/config.php at the NOTICE level:

'logging.level' => SimpleSAML\Logger::NOTICE,
'logging.handler' => 'syslog',

However, this is not so convenient for practical debugging, where you most likely want to log to files, in this case you should specify:

'logging.handler' => 'file',

in which case SSP will write logs to the file simplesamlphp.log in the directory specified earlier within the same configuration file:

'loggingdir' => 'log/',

which defaults to $SSP_DIR/log.

Note: you will want to ensure that any directory that you specify for the loggingdir has the proper file system permissions. The service account under which your webserver runs will need read, write, and execute permissions for this directory. Since that account typically already owns the loggingdir this is usually just a simple matter of: chmod u+rwx if you notice that no logging data is being written to the specified directly.

Rotation

SimpleSAMLphp won’t automatically perform rotation of the simplesamlphp.log file… so you must do it manually with a tool such as logrotate. For a quick example, after installing logrotate if you add the following to /etc/logrotate.d/simplesamlphp:

/var/simplesamlphp/log/simplesamlphp.log {
  daily
  missingok
  notifempty
  copytruncate
  dateext
  rotate 30
}

The logfile /var/simplesamlphp/log/simplesamlphp.log will rotate daily for 30 days.


Looking for support for SimpleSAMLphp? Look no further! Contact us for all of you SSO support needs!

SSO Support for Busy IT Admins 4 — Monitoring

SSO Support for Busy IT Admins 4 — Monitoring

So, that’s it… you’ve been given the weighty responsibility of SSO support for your organization. Or perhaps you’re new to the IAM team. Now what?

This post is the fourth in five-part series on the Fundamentals of SSO Support for IT Administrators.† You can see our first post here, our second post here, and our third post here, and our final post here.

Keeping Tabs on Your SSO Environment

A proper monitoring regime really gives you two – separate but equally important – tools:

  • You’ll more quickly be able to access critically important debugging information when new, unexpected errors arise.
  • You’ll be able to generally keep apprised of what’s going on… i.e. pro-actively tackling issues before they become serious, or more likely, start to gather the attention of users.

Let’s discuss each, in turn.


Know Your Logs

You would be surprised how many technical leads we encounter on a day-to-day basis that either don’t know what information is logged where, or don’t know how to properly tune their logging to get the information that’s relevant to the problem at hand.

My apologies if this post is somewhat Shibboleth-specific, as by it’s nature those products (SP and IDP) seem to obfuscate the logging process somewhat, and for the uninitiated, it can be quite daunting to determine what to long and where it’s controlled. This is further complicated, for example within SP on Windows, by how the Shibboleth Services interact with the web-browser of note. For example… if you’re leveraging Shibboleth SP on IIS, do you know what’s written to shibd.log vs. native.log. And importantly, do you know how to configure native logging properly to a file so that you don’t have to deal with Event Viewer?

It’s fundamentally important to understand what data you’re logging and have access to if you are tasked with providing SSO Support for your organization.

In SSO it’s quite rare that there are problems that result in no useful logging information. And when that does occur, 90% of the time it implies that the issue isn’t on your end, but on your integration partner’s end. The remaining 10% are usually the result of not having the correct logging categories enabled.


Being Proactive

A properly deployed environment will have at least some degree of monitoring involved. This doesn’t necessary mean deploying a full monitoring solution like Nagios, Graylog, or Splunk. More importantly, a simple audit of the logs on a normal cycle (weekly? monthly? when you can remember it?) is better than nothing.

Here, I find logging to files more useful, as you’ll be able to pretty quickly determine what’s an error that we should concern ourselves with – i.e. a particular metadata feed URL randomly dies – versus a warning we can safely ignore – i.e. a user hitting the back button at the wrong time resulting in a stale session warning.

Whatever your SSO environment looks like, take time to familiarize yourself with what is – and isn’t – logged:


Next time… SSO Management Best Practices

We’ll dive into best practices for managing integrations in your environment… what information you should require, to sign or not to sign, and why a good documentation bundle can save you a TON of headaches.

 

† Or — how I learned to stop worrying and love XML.

SSO Support for Busy IT Admins 3 — Finding Help When You Need It (Desperately)

SSO Support for Busy IT Admins 3 — Finding Help When You Need It (Desperately)

So, that’s it… you’ve been given the weighty responsibility of SSO support for your organization. Or perhaps you’re new to the IAM team. Now what?

This post is the third in five-part series on the Fundamentals of SSO Support for IT Administrators.† You can see our first post here, and our second post here. Our fourth post can be found here, and our fifth post here.

Master the Art of Google-Fu

Quick! Something is broken. An obscure error message fills your screen when you try to log in. Who ever is going to help you?!

It's a bird, it's a plane, it's a powerful heuristic search engine!!! Duh duh duhhhhhh!

It’s a bird, it’s a plane, it’s…
a powerful heuristic search engine!

A powerful discriminator between those who provide SSO support well, and those that don’t, is the ability to effectively search out solutions to one’s problem. In 99% of cases, whatever issue you’re encountering that you need to fix.

Here are some quick tips to make your searches more fruitful:

  • Use quotation marks. Searching for "shibboleth" log file location will be more likely to give you good results than shibboleth log file location
  • Use minus signs liberally to restrict keywords: "shibboleth" sp -idp will limit your results to only Service Provider content (ideally)
  • Search specific sites using a colon: shibboleth sp site:wiki.shibboleth.net to search the Shib wiki using Google
  • Search sites that link to a particularly useful resource for explanatory content, i.e. best practices link:wiki.shibboleth.net
  • Try using Google Advanced Search

For more advanced search operators, see: Google Advanced Search Operators: The Ultimate List (40+ Advanced Operators)

Get Help from Others

Okay, Google hasn’t been that helpful. It’s not a miracle cure for all of your SSO Support needs. Maybe it’s pointed you in a couple of directions, but you’re still unsure. No worries… everyone has been there. Which is why, during your searches, you should have encountered tons of resources for where to ask your unanswered questions.

These can be more or less helpful, depending upon the community, who frequents it, who answers questions, and perhaps most importantly… how you ask the questions. Never post to a forum:

ADFS won’t work. What do?! Error -2146885613

Because you’re NOT going to get anything from that. To give you insight into what makes a good question on ANY forum or mailing list, take a look at the StackOverflow guide to asking questions.

Here are some good places to keep in mind for getting help:

Get Help From a Professional

We’d be remiss to not mention ourselves here. If you’re really struggling with a problem, and none of the above have helped, we’re here.

IDM Engineering is a team of dedicated, honest SSO support engineers that are readily available to help you architect a new single sign on environment, manage or improve existing SSO infrastructure, or just dig in and quickly solve a integration issue. We speak SAML… and OAuth… and ADFS… and SimpleSAMLphp… and more. Furthermore, we have a carefully curated collection of technological experience and expertise that can assist you with whatever single sign-on issue you’re facing.

Give us a shot! Let us know how we can help you today!


Next time… Keeping Tabs on Your SSO Environment

We’ll dive into best practices for monitoring your environment… keeping tabs on your servers, looking for problems before they occur, and conducting regular maintenance will help your future self not hate single sign-on so much!

† Or — how I learned to stop worrying and love XML.