Microsoft EntraID (Azure) のセットアップ

このセクションは、Klocwork の Microsoft EntraID (Azure) アクセス制御をセットアップするためのものです。すべての SAML 前提条件が満たされていることを確認してから先に進んでください。

別の認証方法から SAML に切り替えると、現在のユーザーはすべて削除されます。切り替える前に、projects_root/permissions_data フォルダーにバックアップを強くお勧めします。

Microsoft EntraID (Azure) アクセス制御をセットアップするには:

  1. EntraID にインポートして Validate 構成で参照する証明書と秘密キーを用意します。Azure では、それらを PFX ペアとしてインポートする必要があります。証明書と秘密キーをインポート可能な PFX にまとめるには、以下のコマンドを実行します。

    openssl pkcs12 -export -out azure-saml-cert.pfx -inkey private-key.pem -in certificate.crt
  2. Azure EntraID アプリの登録で、Validate アプリを選択します。

  3. [証明書/シークレットの追加] で、生成された PFX ファイルをインポートします。

  4. [リダイレクト URI] で、以下の形式を使用してリダイレクト URL を追加します。

    https://{validate-host}:{port}/kwauthgateway/login/saml2/sso/{user-generated-name}
    Azure はセキュアな HTTPS URL へのリダイレクトのみをサポートしているため、HTTPS を使用するように Validate を構成するか、Validate を HTTPS プロキシの背後で実行する必要があります。
  5. auth.properties ファイルに以下の内容が含まれていることを確認します。

    コピー
    kw.authFramework=saml
    #following values are taken from federationmetadata.xml file (you can choose other attributes from there if you like to)
    kw.userIdAttribute=http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name
    kw.userDnAttribute=http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

    kw.saml.force_authn=true #set to false if you don't want to promt user to login every time while session is still active

    #'user-generated-name' that comes afer .registration. must be used as a last part in your ACS URL (Redirect URL) in Infra ID like so - https://{validate-host}:{port}/kwauthgateway/login/saml2/sso/{user-generated-name}
    spring.security.saml2.relyingparty.registration.{user-generated-name}.assertingparty.metadata-uri = https://login.microsoftonline.com/9b48dacb-0069-42ea-a24a-22c6f85fcddc/federationmetadata/2007-06/federationmetadata.xml?appid={your Application (clien) ID. See 1 on screenshot}}
    spring.security.saml2.relyingparty.registration.{user-generated-name}.entity-id = validate-saml {Application ID URI (see 2 on screenshot)}
    #private-key + certificate needs to be generated, placed into specified location and also imported to Infra ID as a pfx file
    spring.security.saml2.relyingparty.registration.{user-generated-name}.signing.credentials[0].private-key-location=file:${PROJECTS_ROOT}/auth/private-key.pem
    spring.security.saml2.relyingparty.registration.{user-generated-name}.signing.credentials[0].certificate-location=file:${PROJECTS_ROOT}/auth/certificate.crt

詳細情報

SAML の SSL を有効にするには、SAML または OIDC 認証用に SSL を有効にするを参照してください