SAML Request の検証
SAML Request は Deflate + Base64 でエンコードされています。ただし、IMAP/CalDAV API で SAML Request が渡される場合は Base64 エンコードのみとなります。
それぞれの場合に合わせて検証してください。
SAML Request明細
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:AuthnRequest
xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
AssertionConsumerServiceURL="{ACS URL}"
ID="{LINE WORKS認証システムで発行する ID}"
IssueInstant="{Request生成日時}"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
ProviderName="worksmobile.com"
Version="2.0">
<saml2:Issuer
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">worksmobile.com</saml2:Issuer>
<saml2p:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"/>
</saml2p:AuthnRequest>
SAML Requestの各項目は以下のとおりです。
項目 | 説明 |
---|---|
AuthnRequest AssertionConsumerServiceURL | SAML Response を渡す URL(ACS URL)。 例 "https://auth.worksmobile.com/acs/{ドメイン名} " |
AuthnRequest ID | LINE WORKS 認証システムで発行する ID。SAML Response 生成時に使用する。 |
AuthnRequest IssueInstant | SAML Request 生成日時 |
AuthnRequest ProtocolBinding | SAML Response は必ず POST 方式を指定。 |
AuthnRequest ProviderName | プロバイダー名。"worksmobile.com" 固定。 |
Issuer | SAML Request を発行した SP 名。"worksmobile.com" 固定。 |
SAML Request Example
<?xml version="1.0" encoding="UTF-8"?>
<saml2p:AuthnRequest
xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
AssertionConsumerServiceURL="https://auth.worksmobile.com/acs/company.com"
ID="bemkplgpdoemkhjmncgmbcdibglpngclfombpmed"
IssueInstant="2018-02-14T03:33:49.999Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
ProviderName="worksmobile.com"
Version="2.0">
<saml2:Issuer
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">worksmobile.com</saml2:Issuer>
<saml2p:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"/>
</saml2p:AuthnRequest>