前提
本手順は作成途中のメモです。結局うまくいかなかったため、参考にしないでください。
コンポーネント同士の組み合わせで、実装できない壁があっためメモ。
コンポーネント | 安定構成(現状重視) | 将来対応構成(IdP 5 用) |
---|---|---|
IdP | 4.x 系(最新例:4.3.x) | 5.x 系 |
SP | 3.5.x(最新安定版) | 同左(最新 3.5.x) |
Java | 11(IdP 4 用) | 17(IdP 5 必須) |
Jetty | 10(Servlet 4/JSP 2.3)または 12 | 11(Servlet/JSP 最新)または 12 |
Servlet API | 3.1(Jetty 10)または 4.0 | 5.0(Jetty 11+) |
JSP | 2.3(Jetty 10) | 3.0(Jetty 11)または 2.3〜3.1(Jetty 12) |
Shibboleth SP
主要なファイルについて
Shibboleth IdP + SP を 安定構成(IdP 4.x + Java 11 + Jetty 10 + SP 3.5.x) で構築する際の、主要な構成ファイルとその役割を以下に整理します。Linux(RHEL / CentOS / Ubuntu)環境での運用を前提とします。
🛠️ システム構成概要
-
IdP(Javaアプリ):
/opt/shibboleth-idp
-
Jetty(Servlet コンテナ):
/opt/jetty
-
SP(Apache モジュール):
/etc/shibboleth
,/etc/httpd/conf.d
(または/etc/apache2
)
📁 Shibboleth IdP 側の主要ファイル
1. /opt/shibboleth-idp/conf/idp.properties
- IdP 全体の基本設定
- ポート番号、ホスト名、キー/証明書のパスなど
idp.entityID=https://idp.example.org/idp/shibboleth
idp.scope=example.org
idp.signing.key=credentials/idp-signing.key
2. /opt/shibboleth-idp/conf/attribute-resolver.xml
- ユーザー属性の取得方法(LDAP や DB から)
- Attribute 定義や識別子の変換を定義
<DataConnector id="myLDAP" xsi:type="LDAPDirectory" ... />
<AttributeDefinition id="uid" xsi:type="Simple">
<InputDataConnector ref="myLDAP" attributeNames="uid"/>
</AttributeDefinition>
3. /opt/shibboleth-idp/conf/attribute-filter.xml
- 属性の送信制御(SP に渡すかどうかのポリシー)
<AttributeFilterPolicy id="releaseToExampleSP">
<PolicyRequirementRule xsi:type="Requester" value="https://sp.example.org/shibboleth" />
<AttributeRule attributeID="uid">
<PermitValueRule xsi:type="ANY"/>
</AttributeRule>
</AttributeFilterPolicy>
4. /opt/shibboleth-idp/conf/metadata-providers.xml
- SP のメタデータ読み込み(ローカル or URL)
<MetadataProvider id="ExampleSP" xsi:type="FileBackedHTTPMetadataProvider"
metadataURL="https://sp.example.org/metadata"
backingFile="%{idp.home}/metadata/sp.xml"
...
/>
5. /opt/shibboleth-idp/credentials/
-
証明書と鍵(IdP署名・暗号化など)
-
idp-signing.key
,idp-encryption.key
,idp-signing.crt
など
-
6. /opt/shibboleth-idp/metadata/idp-metadata.xml
- IdP 自身のメタデータファイル(SP への提供用)
📁 Jetty 側(Servletコンテナ)
1. /opt/jetty/start.ini
-
Jetty 起動オプション
- 必要なモジュール (
server
,deploy
,jsp
,http
,ssl
,logging
) などを指定
- 必要なモジュール (
--module=server,deploy,webapp,jsp,http,ssl
jetty.ssl.port=8443
2. /opt/jetty/webapps/idp.xml
- IdP の Web アプリケーション構成(WAR展開)
-
war
ファイルのパスとコンテキスト (/idp
) を指定
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="war"><SystemProperty name="idp.home"/>/war/idp.war</Set>
<Set name="contextPath">/idp</Set>
</Configure>
📁 SP 側(Apache HTTPD)
1. /etc/shibboleth/shibboleth2.xml
- SP の中心的な設定ファイル
<ApplicationDefaults entityID="https://sp.example.org/shibboleth" ... >
<Sessions lifetime="28800" timeout="3600" ... />
<MetadataProvider type="XML" file="idp-metadata.xml"/>
</ApplicationDefaults>
2. /etc/httpd/conf.d/shib.conf
(または /etc/apache2/sites-available/
)
- Apache 側に Shibboleth モジュールを組み込む設定
<Location /secure>
AuthType shibboleth
ShibRequestSetting requireSession 1
require valid-user
</Location>
3. /etc/shibboleth/attribute-map.xml
- IdP から送られる属性の名前マッピング(IdP ⇒ Apache 環境変数)
<Attribute name="urn:oid:0.9.2342.19200300.100.1.1" id="uid"/>
✅ まとめ:安定構成での設置ポイント
コンポーネント | 主な設定ファイル | 目的 |
---|---|---|
IdP |
idp.properties , attribute-resolver.xml , attribute-filter.xml
|
属性管理、ポリシー制御 |
Jetty |
start.ini , webapps/idp.xml
|
Servlet/JSP 実行基盤 |
SP |
shibboleth2.xml , attribute-map.xml , Apache shib.conf
|
SP連携、IdPメタデータ接続 |
この構成で、セキュリティ・可搬性・安定性を保った Shibboleth システムが構築可能です。
要望があれば、各ファイルのテンプレートや自動化スクリプト例も提供可能です。お気軽にお知らせください。
1.仮想環境の作成
1.1 VMwareをインストールする。
1.2 CentOSをダウンロードする。
※本手順では、CentOS Stream9を使用しました。最新版10を使用した場合、shibbolethの公式パッケージが対応していませ。
1.3 VMwareにて、各サーバを立てる。
1.4 各VMのIPアドレスを管理する。
ip addr
2.SPに簡単なWebアプリを作成する。(疎通確認用)
2.1 Apche HTTP Serverのインストール
① sudo yum install httpd -y
② sudo systemctl start httpd
③ sudo systemctl enable httpd
※③は任意。
2.2 Tomcatのインストール
① sudo yum install java-11-openjdk -y
② cd /opt
③ sudo curl -O https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.105/bin/apache-tomcat-9.0.105.tar.gz
④ sudo tar xvf apache-tomcat-9.0.105.tar.gz
⑤ sudo mv apache-tomcat-9.0.105.tar.gz tomcat9
⑥ sudo /opt/apache-tomcat-9.0.105/bin/startup.sh
※①で失敗する場合
コマンド:yum search openjdk
結果を桃とにインストール可能なJDKを確認。インストール例;sudo yum install java-21-openjdk -y
③のあと、ls -lh apache-tomcat-9.0.105.tar.gzを実行し、15MB程度あることを確認すると安全です。
2.3 HTMLの配置
① sudo -i
cd /opt/apache-tomcat-9.0.105/webapps/ROOT
② sudo vi hello.html
下記のファイルを配置する。webapps/ROOT
<!DOCTYPE html>
<html>
<head>
<title>Hello Tomcat</title>
</head>
<body>
<h1>Hello, Tomcat!</h1>
</body>
</html>
Esc → :wq → Enter
2.4 SPブラウザで確認
http://<サーバのIPアドレス>:8080/hello.html
http://192.168.73.130:8080/hello.html
2.5 Clientからアクセスできるよう、8080ポートを許可する
sudo firewall-cmd --add-port=8080/tcp --permanent
sudo firewall-cmd --reload
2.6 Clientブラウザで確
http://<サーバのIPアドレス>:8080/hello.html
3.Idpにshibbolethをインストールする。
※本手順では、直接PRMパッケージをダウンロードしてインストールする。
3.1 shibboleth公式リポジトリを追加する。
① sudo vi /etc/yum.repos.d/shibboleth.repo
上記をもとに下記を貼り付け
※ https://shibboleth.net/downloads/service-provider/RPMS/
[shibboleth_CentOS_8]
name=Shibboleth CentOS 8
type=rpm-md
mirrorlist=https://shibboleth.net/cgi-bin/mirrorlist.cgi/CentOS_8
gpgcheck=1
gpgkey=https://shibboleth.net/downloads/service-provider/RPMS/repomd.xml.key
https://shibboleth.net/downloads/service-provider/RPMS/cantor.repomd.xml.key
enabled=1
② sudo dnf makecache
③ sudo dnf install shibboleth
④ sudo systemctl enable --now shibd
sudo systemctl enable --now httpd
-
事前準備
4.1/etc/hostにファイルをセットするsudo vi /etc/hosts
4.2 SPの設定ファイルを編集する。
下記例
<Sessions lifetime="28800" timeout="3600" handlerSSL="false"> <SSO entityID="https://idp.local.test/idp/shibboleth"> SAML2 SAML1 </SSO> <Logout>SAML2 Local</Logout> <Handler type="Status" Location="/Status"/> <Handler type="MetadataGenerator" Location="/Metadata"/> <Handler type="Session" Location="/Session"/> </Sessions> <CredentialResolver type="File" key="/etc/shibboleth/sp-key.pem" certificate="/etc/shibboleth/sp-cert.pem"/> <!-- IdPのメタデータをローカルから読み込む場合 --> <MetadataProvider type="XML" file="/etc/shibboleth/idp-metadata.xml" /> </ApplicationDefaults>
上から順に
・・・SPの識別子
・・・認証後にREMOTE_USERとして使用する属性を指定
"・・・セッション管理用のハンドラ(ステータス確認など)をSSLなしで動作させる設定(通常はtrueを推奨)
"
・・・ IdP(アイデンティティプロバイダ)のURLを指定
・・・SAML1とSAML2をサポート
・・・SAML2プロトコルを使用したログアウト
・・・Shibbolethの状態確認ページ
"・・・SPのメタデータを生成(例:https://sp.local.test/Metadata)
"
"・・・セッション情報を確認できるページ(例:https://sp.local.test/Session)
"
・・・ファイルベースの証明書管理を使用
・・・SPの秘密鍵の場所
・・・SPの公開証明書の場所
を の中に移動してください。
・・・XMLファイル形式のメタデータを読み込む
・・・ IdPのメタデータを指定のローカルファイルから取得
メモ
4.3 構文チェックをする。
sudo xmllint --noout /etc/shibboleth/shibboleth2.xml
手順4.3で作成したSP設定ファイルの下記に対応するように作成していく。
5 証明書作成(SP編)
<CredentialResolver type="File"
key="/etc/ssl/private/sp-key.pem"
certificate="/etc/ssl/certs/sp-cert.pem"/>
5.1 秘密鍵格納用のフォルダ作成
sudo mkdir -p /etc/ssl/private/
sudo chmod 700 /etc/ssl/private/
5.2 秘密鍵の生成
sudo openssl genrsa -out /etc/ssl/private/sp-key.pem 2048 # SPで実行
5.3 証明書署名要求(CSR)の作成
sudo openssl req -new -key /etc/ssl/private/sp-key.pem -out /etc/ssl/certs/sp.csr
※下記はCommonNameを除いてダミーでOKです。
Country Name (2 letter code) [XX]:JP
State or Province Name (full name) []:Aichi
Locality Name (eg, city) [Default City]:Nagoya
Organization Name (eg, company) [Default Company Ltd]:TEST_COM
Organizational Unit Name (eg, section) []:TEST_UNIT
Common Name (eg, your name or your server's hostname) []: sp.local.test
Email Address []:test@mail
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
5.5 自己証明書の作成
sudo openssl x509 -req -days 365 -in /etc/ssl/certs/idp.csr -signkey /etc/ssl/private/idp-key.pem -out /etc/ssl/certs/idp-cert.pem
※ 下記コマンドで証明書の確認ができます。
openssl x509 -in /etc/ssl/certs/sp-cert.pem -text -noout
※ 下記コマンドで秘密鍵との整合性チェックできます。
5.6 Aptcheに証明書を適用する。
下記の設定をsudo vi /etc/httpd/conf.d/ssl.confに設定する。
SSLCertificateFile /etc/ssl/certs/sp-cert.pem
SSLCertificateKeyFile /etc/ssl/private/sp-key.pem
例
<VirtualHost *:443>
ServerName sp.local.test
SSLEngine on
SSLCertificateFile /etc/ssl/certs/sp-cert.pem
SSLCertificateKeyFile /etc/ssl/private/sp-key.pem
SSLCertificateChainFile /etc/ssl/certs/ca-cert.pem # CA証明書がある場合
DocumentRoot /var/www/html
</VirtualHost>
5.7 適用をチェックする。
sudo apachectl configtest
5.8 Apcheの再起動
sudo systemctl restart httpd
5.9 ブラウザを用いた確認
https://sp.local.test/
6.Idp構築
6.1 必要パッケージをインストールする。
① sudo dnf install -y epel-release
② sudo dnf install -y java-17-openjdk wget unzip curl firewalld
※下記コマンドでJavaを確認する
6.2 Jetty リポジトリの作成
# Jetty リポジトリの追加(必要であれば)
① wget https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.4.52.v20230823/jetty-distribution-9.4.52.v20230823.tar.gz
② tar -zxvf jetty-distribution-9.4.52.v20230823.tar.gz
③ sudo mv jetty-distribution-9.4.52.v20230823 /opt/jetty
6.3 Jettyを環境変数に追加。
① nano ~/.bashrc
ファイルを開き、末尾に下記を追加。
export JETTY_HOME=/opt/jetty
export PATH=$JETTY_HOME/bin:$PATH
② source ~/.bashrc
③ echo $JETTY_HOME
6.3 Shibboles Idpのダウンロードとインストール
SPのバージョンは完全一致である必要はなく、SAML2.0に対応していれば問題ないです。
① cd /opt
② sudo wget https://shibboleth.net/downloads/identity-provider/latest/shibboleth-identity-provider-5.1.4.tar.gz
③ sudo tar -zxvf shibboleth-identity-provider-5.1.4.tar.gz
④ sudo mv shibboleth-identity-provider-5.1.4 /opt/shibboleth-idp-installer
⑤ cd /opt/shibboleth-idp-installer
# ディレクトリの作成先を指定してインストール
⑥ sudo ./bin/install.sh
⑦ インストール中にいくつかきかれるので回答します。
[cent-idp@localhost shibboleth-idp-installer]$ sudo ./bin/install.sh
Installation Directory: [/opt/shibboleth-idp] ?
/opt/shibboleth-idp
INFO - New Install. Version: 5.1.4
Host Name: [sp.local.test] ?
idp.local.test
INFO - Creating idp-signing, CN = idp.local.test URI = https://idp.local.test/idp/shibboleth, keySize=3072
INFO - Creating idp-encryption, CN = idp.local.test URI = https://idp.local.test/idp/shibboleth, keySize=3072
INFO - Creating backchannel keystore, CN = idp.local.test URI = https://idp.local.test/idp/shibboleth, keySize=3072
INFO - Creating Sealer KeyStore
INFO - No existing versioning property, initializing...
SAML EntityID: [https://idp.local.test/idp/shibboleth] ?
https://idp.local.test/idp/shibboleth
Attribute Scope: [local.test] ?
local.test
6.4 JettyにIdpをデプロイ
# WARファイルを Jetty に設置
sudo cp /opt/shibboleth-idp/war/idp.war /opt/jetty/webapps/idp.war
6.5 ファイアウォールを設定
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
6.6 疎通確認を実施する
cd /opt/jetty
java -jar start.jar
192.168.73.129:8080/idp
※うまくいかない場合、
ls -l lib/apache-jsp | grep jakarta.servlet.jsp-apiが空であるか確認、空の場合は下記のコマンド実行
wget https://repo1.maven.org/maven2/jakarta/servlet/jsp/jakarta.servlet.jsp-api/3.0.0/jakarta.servlet.jsp-api-3.0.0.jar
mv jakarta.servlet.jsp-api-3.0.0.jar lib/apache-jsp/
cat start.ini | grep jsp
`=--module=jsp
http://192.168.73.129:8080/idp
5 証明書作成(IDP編)
5.1 秘密鍵格納用のフォルダ作成
sudo mkdir -p /etc/ssl/private/
sudo chmod 700 /etc/ssl/private/
5.2 秘密鍵の生成
sudo openssl genrsa -out /etc/ssl/private/idp-key.pem 2048
5.3 証明書署名要求(CSR)の作成
sudo openssl req -new -key /etc/ssl/private/idp-key.pem -out /etc/ssl/certs/sp.csr
5.5 自己証明書の作成
sudo openssl x509 -req -days 365 -in /etc/ssl/certs/sp.csr -signkey /etc/ssl/private/sp-key.pem -out /etc/ssl/certs/sp-cert.pem
※下記コマンドで秘密鍵との整合性チェックができます。
sudo openssl x509 -in /etc/ssl/certs/sp-cert.pem -text -noout
6.5 idp.propertiesに証明書設定
sudo vi /opt/shibboleth-idp/conf/idp.properties
下記を設定
idp.signing.key = /etc/ssl/private/idp-key.pem
idp.signing.cert = /etc/ssl/certs/idp-cert.pem
sudo vi /opt/shibboleth-idp/metadata/idp-metadata.xml
<KeyDescriptor use="signing">
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>
MIIBIjANBgkqhkiG...
</X509Certificate>
</X509Data>
</KeyInfo>
</KeyDescriptor>
下記の内容を設定
sudo cat /etc/ssl/certs/idp-cert.pem | sed -e 's/-----BEGIN CERTIFICATE-----//' -e 's/-----END CERTIFICATE-----//' | tr -d '\n'
5.6 Apcheの再起動
sudo systemctl restart httpd
5.6 ブラウザを用いた確認
https://sp.local.test/
下記コマンドで何とかなりました。
sudo setenforce 0
メモ
ShibbolethやSAMLにおける**Metadata(メタデータ)**とは、
サービスプロバイダ(SP)やアイデンティティプロバイダ(IdP)の「公開情報」をXML形式で記述したものです。
主な内容
- entityID(識別子)
- 証明書情報(公開鍵)
- 通信に使うエンドポイントURL(ログインやログアウトのURLなど)
- サポートするSAMLプロトコルやバインディング
役割
- 相手(SPやIdP)がどんな情報を持ち、どこに通信すればよいかを自動的に伝える
- 信頼関係の構築(証明書で署名されている場合、なりすまし防止)
例
SPのメタデータ例(抜粋):
<EntityDescriptor entityID="https://sp.example.org/shibboleth">
<SPSSODescriptor>
<KeyDescriptor use="signing">
<KeyInfo>...</KeyInfo>
</KeyDescriptor>
<AssertionConsumerService Binding="..." Location="https://sp.example.org/Shibboleth.sso/SAML2/POST"/>
</SPSSODescriptor>
</EntityDescriptor>
まとめ
Metadataは、SAML連携する相手に自分の情報(証明書・通信先URLなど)を伝えるためのXMLファイルです。
IdPとSPはこのメタデータを交換・登録することで、相互に安全な通信ができるようになります。
lib/jetty-server-9.4.52.v20230823.jar
Java:
推奨バージョンは Java 17(もしくは LTS の Java 11)
実際のログ出力でも JDK 17.0.14+ が使用されており、IdP 5.1.4 は Java 17 で十分に動作します。Java 17 は最新のLTSとして広く採用されており、セキュリティやパフォーマンス面でも適しています。
Jetty:
推奨バージョンは Jetty 9.4.x(例:9.4.52.v20230823)
IdP 5.1.4 の標準ディストリビューションでは Jetty 9.4 系が使われています。Jetty 9.4 は Java EE 8 の仕様(javax.*)に基づいており、Shibboleth IdP の各コンポーネントと互換性があります。
JSP/Servlet API(Jakarta vs. Javax):
Java EE 8 用の javax 名前空間のライブラリを使用することが推奨されます。
たとえば、JSP API は「javax.servlet.jsp-api」バージョン 2.3.x(例:2.3.3)が適切です。
注意点として、Jakarta EE 9 以降のライブラリは jakarta.* 名前空間に移行しており、名前空間が異なるため、Jetty 9.4(および IdP 5.1.4)が期待する javax.* と互換性がありません。
もし Jakarta ベースのライブラリ(jakarta.servlet.jsp-api など)を使用すると、先に見たような JSP のコンパイルエラー(メソッドシグネチャの不一致)が発生します。したがって、IdP 5.1.4 では Jakarta EE 9 系にアップグレードする代わりに、javax ベースの依存関係に統一するか、コンテナ自体を Jetty 11 など Jakarta 対応版にアップグレードする必要がありますが、後者は IdP 5.1.4 のサポート範囲外となるため推奨されません。
メモメモ
[root@localhost log]# sudo cat /etc/shibboleth/shibboleth2.xml
<OutOfProcess tranLogFormat="%u|%s|%idp|%i|%ac|%t|%attr|%n|%b|%E|%S|%SS|%L|%UA|%a" />
<!--
By default, in-memory StorageService, ReplayCache, ArtifactMap, and SessionCache
are used. See example-shibboleth2.xml for samples of explicitly configuring them.
-->
<!-- The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined. -->
<ApplicationDefaults entityID="https://sp.local.test/shibboleth"
REMOTE_USER="eppn persistent-id targeted-id">
<!--
Controls session lifetimes, address checks, cookie handling, and the protocol handlers.
Each Application has an effectively unique handlerURL, which defaults to "/Shibboleth.sso"
and should be a relative path, with the SP computing the full value based on the virtual
host. Use of TLS is now assumed because browsers are enforcing it due to SameSite
restrictions. Note that while we default checkAddress to "false", this makes an assertion
stolen in transit easier for attackers to misuse.
-->
<Sessions lifetime="28800" timeout="3600" handlerSSL="true">
<SSO entityID="https://idp.local.test/idp/shibboleth">
SAML2 SAML1
</SSO>
<Logout>SAML2 Local</Logout>
<Handler type="Status" Location="/Shibboleth.sso/Status"/>
<Handler type="MetadataGenerator" Location="/Shibboleth.sso/Metadata"/>
<Handler type="Session" Location="/Shibboleth.sso/Session"/>
<!-- Example of locally maintained metadata. -->
<!--
<MetadataProvider type="XML" validate="true" path="partner-metadata.xml"/>
-->
<!-- Example of remotely supplied batch of signed metadata. -->
<!--
<MetadataProvider type="XML" validate="true"
url="http://federation.org/federation-metadata.xml"
backingFilePath="federation-metadata.xml" maxRefreshDelay="7200">
<MetadataFilter type="RequireValidUntil" maxValidityInterval="2419200"/>
<MetadataFilter type="Signature" certificate="fedsigner.pem" verifyBackup="false"/>
<DiscoveryFilter type="Exclude" matcher="EntityAttributes" trimTags="true"
attributeName="http://macedir.org/entity-category"
attributeNameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
attributeValue="http://refeds.org/category/hide-from-discovery" />
</MetadataProvider>
-->
<!-- Example of remotely supplied "on-demand" signed metadata. -->
<!--
<MetadataProvider type="MDQ" validate="true" cacheDirectory="mdq"
baseUrl="http://mdq.federation.org" ignoreTransport="true">
<MetadataFilter type="RequireValidUntil" maxValidityInterval="2419200"/>
<MetadataFilter type="Signature" certificate="mdqsigner.pem" />
</MetadataProvider>
-->
<!-- Map to extract attributes from SAML assertions. -->
<AttributeExtractor type="XML" validate="true" reloadChanges="false" path="attribute-map.xml"/>
<!-- Default filtering policy for recognized attributes, lets other data pass. -->
<AttributeFilter type="XML" validate="true" path="attribute-policy.xml"/>
<!-- Simple file-based resolvers for separate signing/encryption keys. -->
<CredentialResolver type="File"
key="/etc/ssl/private/sp-key.pem"
certificate="/etc/pki/tls/certs/sp-cert.pem"/>
</ApplicationDefaults>
<!-- Policies that determine how to process and authenticate runtime messages. -->
<SecurityPolicyProvider type="XML" validate="true" path="security-policy.xml"/>
<!-- Low-level configuration about protocols and bindings available for use. -->
メモメモ②
Set false if you do not want the IdP to check (asynchronously) whether
it can be updated or not when the container starts
#idp.updateCheck.enable=true
Auto-load all files matching conf/**/*.properties
Disable if you want to manually maintain a list of sources.
idp.searchForProperties=true
Load any "outside-tree" property sources from a comma-delimited list
idp.additionalProperties=/credentials/secrets.properties
In most cases (and unless noted in the surrounding comments) the
commented settings in the distributed files document default behavior.
Uncomment them and change the value to change functionality.
Uncommented properties are either required or ship non-defaulted.
Set the entityID of the IdP
idp.entityID=https://idp.local.test/idp/shibboleth
Set the file path which backs the IdP's own metadata publishing endpoint at /shibboleth.
Set to empty value to disable and return a 404.
#idp.entityID.metadataFile=%{idp.home}/metadata/idp-metadata.xml
Set the scope used in the attribute resolver for scoped attributes
idp.scope=local.test
General cookie properties (maxAge only applies to persistent cookies)
#idp.cookie.secure = true
#idp.cookie.httpOnly = true
#idp.cookie.domain =
Note the path is now / to allow defaulting to __Host- prefixed names.
#idp.cookie.path = /
#idp.cookie.maxAge = 31536000
These control operation of the SameSite filter, which is off by default.
#idp.cookie.sameSite = None
#idp.cookie.sameSiteCondition = shibboleth.Conditions.FALSE
Enable cross-site request forgery (CSRF) mitigation for views.
idp.csrf.enabled=true
Enable a new CSRF token per-flow. Otherwise, it is generated per-view.
#idp.csrf.token.perFlow = false
Name of the HTTP parameter that stores the CSRF token.
#idp.csrf.token.parameter = csrf_token
HSTS/CSP response headers
#idp.hsts = max-age=31536000
X-Frame-Options value, set to DENY or SAMEORIGIN to block framing
#idp.frameoptions = DENY
Content-Security-Policy value, set to match X-Frame-Options default
#idp.csp = frame-ancestors 'none'; base-uri 'none';
Set to false to disable CSP protection within SAML message templates
#idp.encoders.cspEnabled = true
Set to false to disable filter that forcibly applies UTF-8 encoding
#idp.encoding.forceUTF8 = true
Enable and control MDC filter
#idp.logging.MDC.enabled = true
#idp.logging.MDC.createSession = true
Set the location of user-supplied web flow definitions
#idp.webflows = %{idp.home}/flows
Set the location of Velocity view templates
#idp.views = %{idp.home}/views
Do we fail on velocity "syntax errors"
#idp.velocity.runtime.strictmode=false
Settings for internal AES encryption key
#idp.sealer.keyStrategy = shibboleth.DataSealerKeyStrategy
#idp.sealer.storeType = JCEKS
#idp.sealer.updateInterval = PT15M
#idp.sealer.aliasBase = secret
idp.sealer.storeResource=%{idp.home}/credentials/sealer.jks
idp.sealer.versionResource=%{idp.home}/credentials/sealer.kver
Settings for public/private signing and encryption key(s):
During decryption key rollover, point the ".2" properties at a second
keypair, uncomment in credentials.xml, then publish it in your metadata.
idp.signing.key=/etc/ssl/private/idp-key.pem
idp.signing.cert=/etc/ssl/certs/idp-cert.pem
idp.encryption.key=%{idp.home}/credentials/idp-encryption.key
idp.encryption.cert=%{idp.home}/credentials/idp-encryption.crt
#idp.encryption.key.2 = %{idp.home}/credentials/idp-encryption-old.key
#idp.encryption.cert.2 = %{idp.home}/credentials/idp-encryption-old.crt
Sets the bean ID to use as a default security configuration set
#idp.security.config = shibboleth.DefaultSecurityConfiguration
To downgrade to SHA-1, set to shibboleth.SigningConfiguration.SHA1
#idp.signing.config = shibboleth.SigningConfiguration.SHA256
The new install default for encryption is now AES-GCM.
idp.encryption.config=shibboleth.EncryptionConfiguration.GCM
Sets the default strategy for key agreement key wrap usage for credentials from metadata,
if not otherwise configured on the security configuration
#idp.encryption.keyagreement.metadata.defaultUseKeyWrap = Default
Configures trust evaluation of keys used by services at runtime
Internal default is Chaining, overriden for new installs
idp.trust.signatures=shibboleth.ExplicitKeySignatureTrustEngine
Other options:
shibboleth.ChainingSignatureTrustEngine, shibboleth.PKIXSignatureTrustEngine
idp.trust.certificates=shibboleth.ExplicitKeyX509TrustEngine
Other options:
shibboleth.ChainingX509TrustEngine, shibboleth.PKIXX509TrustEngine
If true, encryption will happen whenever a key to use can be located, but
failure to encrypt won't result in request failure.
#idp.encryption.optional = false
Configuration of client- and server-side storage plugins
#idp.storage.cleanupInterval = PT10M
idp.storage.htmlLocalStorage=true
#idp.storage.clientSessionStorageName = shib_idp_session_ss
#idp.storage.clientPersistentStorageName = shib_idp_persistent_ss
Set to true to expose more detailed errors in responses to SPs
#idp.errors.detailed = false
Set to false to skip signing of SAML response messages that signal errors
#idp.errors.signed = true
Name of bean containing a list of Java exception classes to ignore
#idp.errors.excludedExceptions = ExceptionClassListBean
Name of bean containing a property set mapping exception names to views
#idp.errors.exceptionMappings = ExceptionToViewPropertyBean
Set if a different default view name for events and exceptions is needed
#idp.errors.defaultView = error
Set to false to disable the IdP session layer
#idp.session.enabled = true
Set to true to rely on persistent cookies for session management
#idp.session.persistent = false
Set to "shibboleth.StorageService" for server-side storage of user sessions
#idp.session.StorageService = shibboleth.ClientSessionStorageService
Name of cookie used for session
#idp.session.cookieName = __Host-shib_idp_session
Size of session IDs
#idp.session.idSize = 32
Bind sessions to IP addresses
#idp.session.consistentAddress = true
Inactivity timeout
#idp.session.timeout = PT60M
Extra time to store sessions for logout
#idp.session.slop = PT0S
Tolerate storage-related errors
#idp.session.maskStorageFailure = false
Track information about SPs logged into
idp.session.trackSPSessions=true
Support lookup by SP for SAML logout
idp.session.secondaryServiceIndex=true
Length of time to track SP sessions
#idp.session.defaultSPlifetime = PT2H
Set to "shibboleth.StorageService" or custom bean for alternate storage of consent
#idp.consent.StorageService = shibboleth.ClientPersistentStorageService
Default consent auditing formats
#idp.consent.terms-of-use.auditFormat = %T|%SP|%e|%u|%CCI|%CCV|%CCA
#idp.consent.attribute-release.auditFormat = %T|%SP|%e|%u|%CCI|%CCV|%CCA
Set to "shibboleth.consent.AttributeConsentStorageKey" to use an attribute
to key user consent storage records (and set the attribute name)
#idp.consent.attribute-release.userStorageKey = shibboleth.consent.PrincipalConsentStorageKey
#idp.consent.attribute-release.userStorageKeyAttribute = uid
#idp.consent.terms-of-use.userStorageKey = shibboleth.consent.PrincipalConsentStorageKey
#idp.consent.terms-of-use.userStorageKeyAttribute = uid
Suffix of message property used as value of consent storage records when idp.consent.compareValues is true.
Defaults to text displayed to the user.
#idp.consent.terms-of-use.consentValueMessageCodeSuffix = .text
Flags controlling how built-in attribute consent feature operates
#idp.consent.allowDoNotRemember = true
#idp.consent.allowGlobal = true
#idp.consent.allowPerAttribute = false
Whether attribute values and terms of use text are compared
#idp.consent.compareValues = false
Maximum number of consent records for space-limited storage (e.g. cookies)
#idp.consent.maxStoredRecords = 10
Maximum number of consent records for larger/server-side storage (0 = no limit)
#idp.consent.expandedMaxStoredRecords = 0
idp.loglevel=INFO
idp.logfile=/opt/shibboleth-idp/logs/idp-process.log
Time in milliseconds to expire consent storage records.
Leave commented out for the default of infinite
#idp.consent.storageRecordLifetime =
Path to use with External interceptor flow
#idp.intercept.External.externalPath = contextRelative:intercept.jsp
Policies to use with Impersonate interceptor flow
#idp.impersonate.generalPolicy = GeneralImpersonationPolicy
#idp.impersonate.specificPolicy = SpecificImpersonationPolicy
Picks outbound bindings more sensibly than based on metadata order
idp.bindings.inMetadataOrder=false
Whether to lookup metadata, etc. for every SP involved in a logout
for use by user interface logic; adds overhead so off by default.
#idp.logout.elaboration = false
Whether to require logout requests/responses be signed/authenticated.
#idp.logout.authenticated = true
Whether to handle logout lacking response endpoonts as asynchronous.
#idp.logout.assumeAsync = false
Whether to hide logout propagation status reporting.
#idp.logout.propagationHidden = false
Bean to determine whether user should be allowed to cancel logout
#idp.logout.promptUser=shibboleth.Conditions.FALSE
Message freshness and replay cache tuning
#idp.policy.messageLifetime = PT3M
#idp.policy.assertionLifetime = PT3M
#idp.policy.clockSkew = PT3M
Set to custom bean for alternate storage of replay cache
#idp.replayCache.StorageService = shibboleth.StorageService
#idp.replayCache.strict = true
Toggles whether to allow outbound messages via SAML artifact
#idp.artifact.enabled = true
Suppresses typical signing/encryption when artifact binding used
#idp.artifact.secureChannel = true
May differ to direct SAML 2 artifact lookups to specific server nodes
#idp.artifact.endpointIndex = 2
Set to custom bean for alternate storage of artifact map state
#idp.artifact.StorageService = shibboleth.StorageService
Comma-delimited languages to use if not match can be found with the
browser-supported languages, defaults to an empty list.
idp.ui.fallbackLanguages=en,fr,de
Storage service used by CAS protocol for chained proxy-granting tickets
and when using server-managed "simple" TicketService.
Defaults to shibboleth.StorageService (in-memory)
MUST be server-side storage (e.g. in-memory, memcached, database)
#idp.cas.StorageService=shibboleth.StorageService
CAS service registry implementation class
#idp.cas.serviceRegistryClass=net.shibboleth.idp.cas.service.PatternServiceRegistry
If true, CAS services provisioned with SAML metadata are identified via entityID
#idp.cas.relyingPartyIdFromMetadata=false
F-TICKS auditing - set a salt to include hashed username
#idp.fticks.federation = MyFederation
#idp.fticks.condition = MyFTICKSCondition
#idp.fticks.algorithm = SHA-256
#idp.fticks.salt = somethingsecret
#idp.fticks.loghost = localhost
#idp.fticks.logport = 514
Set false if you want SAML bindings "spelled out" in audit log
idp.audit.shortenBindings=true
Set true if you want inbound SAML requests to enforce that only
allowed HTTP parameters are present
#idp.http.saml.enforceAllowedParameters = false