SAML Request の生成

SP は、認証を行うために IdP である LINE WORKS に SAML Request を送信します。

HTTP Request {#idp-request}

Developer Console の SAML Apps 登録時に発行される SSO URL を利用します。

POST https://auth.worksmobile.com/saml2/idp/{domainName}

注意

  • LINE WORKS のセキュリティポリシーとして HTTPS (443) での Request を推奨しています。

Query Parameters {#idp-request-parameter}

ParameterTypeDescription
SAMLRequestString認証要求メッセージ(Base64 でエンコードする)
required
RelayStateString認証失敗時に再試行する場合に設定する URL
設定した場合、Request で受け取った値をそのまま Response します。

GET Method Request {#idp-request-caution}

注意

  • SAML Request を GET で送信する場合には、SAMLRequest を Deflate + Base64 でエンコードします。

SAML Request Body {#idp-request-body}

<?xml version="1.0" encoding="UTF-8"?><saml2p:AuthnRequest    xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"    AssertionConsumerServiceURL="{LINE WORKS に登録した ACS URL}"    ID="{SP が発行する ID}"    IssueInstant="{SAML Request 生成日時}"    ProtocolBinding="{Protocol Binding}"    ProviderName="{Service Provider Name}"    Version="2.0">    <saml2:Issuer        xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">{LINE WORKS に登録した SP Issuer}</saml2:Issuer>    <saml2p:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"/></saml2p:AuthnRequest>

SAML Request の各項目は以下の通りです。

ParameterTypeDescription
AuthnRequest AssertionConsumerServiceURLStringACS URL
SAML Response を受け取る URL。
Developer Console で登録した ACS URL と同一であること。
required
AuthnRequest IDStringSP が発行する ID
SAML Response 生成時に使用。
required
AuthnRequest IssueInstantDate(UTC)SAML Request 生成日時
required
AuthnRequest ProtocolBindingStringSAML Response を受け取る状態を指定
Protocol Binding 参照。
required
AutnnRequest ProviderNameStringクライアント名
IssuerStringDeveloper Console に登録した SP Issuer (Entity Id) を使用
required
NameIDPolicy FormatStringLINE WORKS では "UNSPECIFIED" で固定して使用
required

Protocol Binding {#idp-request-protocol-binding}

ValueDescription
urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POSTSAML Response を Base64 でエンコードして POST で受け取ります。
その他SAML Response を Deflate + Base64 でエンコードして GET で受け取ります。

SAML Request Body Example {#idp-request-body-example}

<?xml version="1.0" encoding="UTF-8"?><saml2p:AuthnRequest    xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"    AssertionConsumerServiceURL="https://example.com/acs/vendor.com"    ID="fiokocckbjonklcjiepfejmoehpebebmholeoibp"    IssueInstant="2018-02-25T07:42:35Z"    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"    ProviderName="example.com"    Version="2.0">    <saml2:Issuer        xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">SPIssuer</saml2:Issuer>    <saml2p:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"/></saml2p:AuthnRequest>