.. Document meta

:orphan:

.. |antsibull-internal-nbsp| unicode:: 0xA0
    :trim:

.. meta::
  :antsibull-docs: 2.24.0

.. Anchors

.. _ansible_collections.middleware_automation.keycloak.keycloak_identity_provider_module:

.. Anchors: short name for ansible.builtin

.. Title

keycloak_identity_provider -- Allows administration of Keycloak identity providers using Keycloak API
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. Collection note

.. note::
    This module is part of the `middleware_automation.keycloak collection <https://galaxy.ansible.com/ui/repo/published/middleware_automation/keycloak/>`_.

    It is not included in ``ansible-core``.
    To check whether it is installed, run :code:`ansible-galaxy collection list`.

    To install it, use: :code:`ansible\-galaxy collection install middleware\_automation.keycloak`.

    To use it in a playbook, specify: :code:`middleware_automation.keycloak.keycloak_identity_provider`.

.. version_added

.. rst-class:: ansible-version-added

New in middleware\_automation.keycloak 3.0.0

.. contents::
   :local:
   :depth: 1

.. Deprecated


Synopsis
--------

.. Description

- This module allows you to add, remove or modify Keycloak identity providers using the Keycloak REST API. It requires access to the REST API using OpenID Connect; the user connecting and the client being used must have the requisite access rights. In a default Keycloak installation, admin\-cli and an admin user would work, as would a separate client definition with the scope tailored to your needs and a user having the expected roles.
- The names of module options are snake\_cased versions of the camelCase ones found in the Keycloak API and its documentation at \ `https://www.keycloak.org/docs\-api/15.0/rest\-api/index.html <https://www.keycloak.org/docs-api/15.0/rest-api/index.html>`__.


.. Aliases


.. Requirements






.. Options

Parameters
----------

.. raw:: html

  <table class="colwidths-auto ansible-option-table docutils align-default" style="width: 100%">
  <thead>
  <tr class="row-odd">
    <th class="head"><p>Parameter</p></th>
    <th class="head"><p>Comments</p></th>
  </tr>
  </thead>
  <tbody>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-add_read_token_role_on_create"></div>
      <div class="ansibleOptionAnchor" id="parameter-addReadTokenRoleOnCreate"></div>
      <p class="ansible-option-title"><strong>add_read_token_role_on_create</strong></p>
      <a class="ansibleOptionLink" href="#parameter-add_read_token_role_on_create" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: addReadTokenRoleOnCreate</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Enable/disable whether new users can read any stored tokens. This assigns the <code class='docutils literal notranslate'>broker.read-token</code> role.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-alias"></div>
      <p class="ansible-option-title"><strong>alias</strong></p>
      <a class="ansibleOptionLink" href="#parameter-alias" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
        / <span class="ansible-option-required">required</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>The alias uniquely identifies an identity provider and it is also used to build the redirect URI.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-auth_client_id"></div>
      <p class="ansible-option-title"><strong>auth_client_id</strong></p>
      <a class="ansibleOptionLink" href="#parameter-auth_client_id" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>OpenID Connect <em>client_id</em> to authenticate to the API with.</p>
      <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;admin-cli&#34;</code></p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-auth_client_secret"></div>
      <p class="ansible-option-title"><strong>auth_client_secret</strong></p>
      <a class="ansibleOptionLink" href="#parameter-auth_client_secret" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Client Secret to use in conjunction with <em>auth_client_id</em> (if required).</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-auth_keycloak_url"></div>
      <div class="ansibleOptionAnchor" id="parameter-url"></div>
      <p class="ansible-option-title"><strong>auth_keycloak_url</strong></p>
      <a class="ansibleOptionLink" href="#parameter-auth_keycloak_url" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: url</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
        / <span class="ansible-option-required">required</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>URL to the Keycloak instance.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-auth_password"></div>
      <div class="ansibleOptionAnchor" id="parameter-password"></div>
      <p class="ansible-option-title"><strong>auth_password</strong></p>
      <a class="ansibleOptionLink" href="#parameter-auth_password" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: password</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Password to authenticate for API access with.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-auth_realm"></div>
      <p class="ansible-option-title"><strong>auth_realm</strong></p>
      <a class="ansibleOptionLink" href="#parameter-auth_realm" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Keycloak realm name to authenticate to for API access.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-auth_username"></div>
      <div class="ansibleOptionAnchor" id="parameter-username"></div>
      <p class="ansible-option-title"><strong>auth_username</strong></p>
      <a class="ansibleOptionLink" href="#parameter-auth_username" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: username</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Username to authenticate for API access with.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-authenticate_by_default"></div>
      <div class="ansibleOptionAnchor" id="parameter-authenticateByDefault"></div>
      <p class="ansible-option-title"><strong>authenticate_by_default</strong></p>
      <a class="ansibleOptionLink" href="#parameter-authenticate_by_default" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: authenticateByDefault</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Specifies if this identity provider should be used by default for authentication even before displaying login screen.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config"></div>
      <p class="ansible-option-title"><strong>config</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">dictionary</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Dict specifying the configuration options for the provider; the contents differ depending on the value of <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-provider_id"><span class="std std-ref"><span class="pre">provider_id</span></span></a></strong></code>. Examples are given below for <code class="ansible-value literal notranslate">oidc</code> and <code class="ansible-value literal notranslate">saml</code>. It is easiest to obtain valid config values by dumping an already-existing identity provider configuration through check-mode in the <code class="ansible-return-value literal notranslate"><a class="reference internal" href="#return-existing"><span class="std std-ref"><span class="pre">existing</span></span></a></code> field.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/authorizationUrl"></div>
      <p class="ansible-option-title"><strong>authorizationUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/authorizationUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The Authorization URL.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/backchannelSupported"></div>
      <p class="ansible-option-title"><strong>backchannelSupported</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/backchannelSupported" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Does the external IDP support backchannel logout?</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/clientAuthMethod"></div>
      <p class="ansible-option-title"><strong>clientAuthMethod</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/clientAuthMethod" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The client authentication method.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/clientId"></div>
      <p class="ansible-option-title"><strong>clientId</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/clientId" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The client or client identifier registered within the identity provider.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/clientSecret"></div>
      <p class="ansible-option-title"><strong>clientSecret</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/clientSecret" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The client or client secret registered within the identity provider.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/defaultScope"></div>
      <p class="ansible-option-title"><strong>defaultScope</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/defaultScope" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The scopes to be sent when asking for authorization.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/entityId"></div>
      <p class="ansible-option-title"><strong>entityId</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/entityId" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The Entity ID that is used to uniquely identify this SAML Service Provider.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/fromUrl"></div>
      <p class="ansible-option-title"><strong>fromUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/fromUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>IDP well-known OpenID Connect configuration URL.</p>
      <p>Support only <code class="ansible-option-value literal notranslate"><a class="reference internal" href="#parameter-provider_id"><span class="std std-ref"><span class="pre">provider_id=oidc</span></span></a></code>.</p>
      <p><code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/fromUrl"><span class="std std-ref"><span class="pre">config.fromUrl</span></span></a></strong></code> is mutually exclusive with <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/userInfoUrl"><span class="std std-ref"><span class="pre">config.userInfoUrl</span></span></a></strong></code>, <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/authorizationUrl"><span class="std std-ref"><span class="pre">config.authorizationUrl</span></span></a></strong></code>, <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/tokenUrl"><span class="std std-ref"><span class="pre">config.tokenUrl</span></span></a></strong></code>, <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/logoutUrl"><span class="std std-ref"><span class="pre">config.logoutUrl</span></span></a></strong></code>, <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/issuer"><span class="std std-ref"><span class="pre">config.issuer</span></span></a></strong></code> and <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-config/jwksUrl"><span class="std std-ref"><span class="pre">config.jwksUrl</span></span></a></strong></code>.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/gui_order"></div>
      <div class="ansibleOptionAnchor" id="parameter-config/guiOrder"></div>
      <p class="ansible-option-title"><strong>gui_order</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/gui_order" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: guiOrder</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">integer</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Number defining order of the provider in GUI (for example, on Login page).</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/hide_on_login_page"></div>
      <div class="ansibleOptionAnchor" id="parameter-config/hideOnLoginPage"></div>
      <p class="ansible-option-title"><strong>hide_on_login_page</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/hide_on_login_page" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: hideOnLoginPage</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>If hidden, login with this provider is possible only if requested explicitly, for example using the <code class='docutils literal notranslate'>kc_idp_hint</code> parameter.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/issuer"></div>
      <p class="ansible-option-title"><strong>issuer</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/issuer" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The issuer identifier for the issuer of the response. If not provided, no validation is performed.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/jwksUrl"></div>
      <p class="ansible-option-title"><strong>jwksUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/jwksUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>URL where identity provider keys in JWK format are stored. See JWK specification for more details.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/logoutUrl"></div>
      <p class="ansible-option-title"><strong>logoutUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/logoutUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>End session endpoint to use to logout user from external IDP.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/nameIDPolicyFormat"></div>
      <p class="ansible-option-title"><strong>nameIDPolicyFormat</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/nameIDPolicyFormat" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Specifies the URI reference corresponding to a name identifier format.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/principalType"></div>
      <p class="ansible-option-title"><strong>principalType</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/principalType" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Way to identify and track external users from the assertion.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/singleLogoutServiceUrl"></div>
      <p class="ansible-option-title"><strong>singleLogoutServiceUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/singleLogoutServiceUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The URL that must be used to send logout requests.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/singleSignOnServiceUrl"></div>
      <p class="ansible-option-title"><strong>singleSignOnServiceUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/singleSignOnServiceUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The URL that must be used to send authentication requests (SAML AuthnRequest).</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/sync_mode"></div>
      <div class="ansibleOptionAnchor" id="parameter-config/syncMode"></div>
      <p class="ansible-option-title"><strong>sync_mode</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/sync_mode" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: syncMode</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Default sync mode for all mappers. The sync mode determines when user data is synced using the mappers.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/tokenUrl"></div>
      <p class="ansible-option-title"><strong>tokenUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/tokenUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The Token URL.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/useJwksUrl"></div>
      <p class="ansible-option-title"><strong>useJwksUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/useJwksUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>If <code class="ansible-value literal notranslate">true</code>, identity provider public keys are downloaded from given JWKS URL.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/userInfoUrl"></div>
      <p class="ansible-option-title"><strong>userInfoUrl</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/userInfoUrl" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>The User Info URL.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-config/validateSignature"></div>
      <p class="ansible-option-title"><strong>validateSignature</strong></p>
      <a class="ansibleOptionLink" href="#parameter-config/validateSignature" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Enable/disable signature validation of external IDP signatures.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>

  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-connection_timeout"></div>
      <p class="ansible-option-title"><strong>connection_timeout</strong></p>
      <a class="ansibleOptionLink" href="#parameter-connection_timeout" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">integer</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Controls the HTTP connections timeout period (in seconds) to Keycloak API.</p>
      <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">10</code></p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-display_name"></div>
      <div class="ansibleOptionAnchor" id="parameter-displayName"></div>
      <p class="ansible-option-title"><strong>display_name</strong></p>
      <a class="ansibleOptionLink" href="#parameter-display_name" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: displayName</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Friendly name for identity provider.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-enabled"></div>
      <p class="ansible-option-title"><strong>enabled</strong></p>
      <a class="ansibleOptionLink" href="#parameter-enabled" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Enable/disable this identity provider.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-first_broker_login_flow_alias"></div>
      <div class="ansibleOptionAnchor" id="parameter-firstBrokerLoginFlowAlias"></div>
      <p class="ansible-option-title"><strong>first_broker_login_flow_alias</strong></p>
      <a class="ansibleOptionLink" href="#parameter-first_broker_login_flow_alias" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: firstBrokerLoginFlowAlias</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Alias of authentication flow, which is triggered after first login with this identity provider.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-http_agent"></div>
      <p class="ansible-option-title"><strong>http_agent</strong></p>
      <a class="ansibleOptionLink" href="#parameter-http_agent" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Configures the HTTP User-Agent header.</p>
      <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;Ansible&#34;</code></p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-link_only"></div>
      <div class="ansibleOptionAnchor" id="parameter-linkOnly"></div>
      <p class="ansible-option-title"><strong>link_only</strong></p>
      <a class="ansibleOptionLink" href="#parameter-link_only" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: linkOnly</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>If true, users cannot log in through this provider. They can only link to this provider. This is useful if you do not want to allow login from the provider, but want to integrate with a provider.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-mappers"></div>
      <p class="ansible-option-title"><strong>mappers</strong></p>
      <a class="ansibleOptionLink" href="#parameter-mappers" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">list</span>
        / <span class="ansible-option-elements">elements=dictionary</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>A list of dicts defining mappers associated with this Identity Provider.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-mappers/config"></div>
      <p class="ansible-option-title"><strong>config</strong></p>
      <a class="ansibleOptionLink" href="#parameter-mappers/config" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">dictionary</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Dict specifying the configuration options for the mapper; the contents differ depending on the value of <code class="ansible-option literal notranslate"><strong><a class="reference internal" href="#parameter-mappers/identityProviderMapper"><span class="std std-ref"><span class="pre">mappers[].identityProviderMapper</span></span></a></strong></code>.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-mappers/id"></div>
      <p class="ansible-option-title"><strong>id</strong></p>
      <a class="ansibleOptionLink" href="#parameter-mappers/id" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Unique ID of this mapper.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-mappers/identityProviderAlias"></div>
      <p class="ansible-option-title"><strong>identityProviderAlias</strong></p>
      <a class="ansibleOptionLink" href="#parameter-mappers/identityProviderAlias" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Alias of the identity provider for this mapper.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-mappers/identityProviderMapper"></div>
      <p class="ansible-option-title"><strong>identityProviderMapper</strong></p>
      <a class="ansibleOptionLink" href="#parameter-mappers/identityProviderMapper" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Type of mapper.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-indent"></div><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-mappers/name"></div>
      <p class="ansible-option-title"><strong>name</strong></p>
      <a class="ansibleOptionLink" href="#parameter-mappers/name" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-indent-desc"></div><div class="ansible-option-cell">
      <p>Name of the mapper.</p>
    </div></td>
  </tr>

  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-post_broker_login_flow_alias"></div>
      <div class="ansibleOptionAnchor" id="parameter-postBrokerLoginFlowAlias"></div>
      <p class="ansible-option-title"><strong>post_broker_login_flow_alias</strong></p>
      <a class="ansibleOptionLink" href="#parameter-post_broker_login_flow_alias" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: postBrokerLoginFlowAlias</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Alias of authentication flow, which is triggered after each login with this identity provider.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-provider_id"></div>
      <div class="ansibleOptionAnchor" id="parameter-providerId"></div>
      <p class="ansible-option-title"><strong>provider_id</strong></p>
      <a class="ansibleOptionLink" href="#parameter-provider_id" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: providerId</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Protocol used by this provider (supported values are <code class="ansible-value literal notranslate">oidc</code> or <code class="ansible-value literal notranslate">saml</code>).</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-realm"></div>
      <p class="ansible-option-title"><strong>realm</strong></p>
      <a class="ansibleOptionLink" href="#parameter-realm" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>The Keycloak realm under which this identity provider resides.</p>
      <p class="ansible-option-line"><strong class="ansible-option-default-bold">Default:</strong> <code class="ansible-value literal notranslate ansible-option-default">&#34;master&#34;</code></p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-refresh_token"></div>
      <p class="ansible-option-title"><strong>refresh_token</strong></p>
      <a class="ansibleOptionLink" href="#parameter-refresh_token" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Authentication refresh token for Keycloak API.</p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-state"></div>
      <p class="ansible-option-title"><strong>state</strong></p>
      <a class="ansibleOptionLink" href="#parameter-state" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>State of the identity provider.</p>
      <p>On <code class="ansible-value literal notranslate">present</code>, the identity provider is created if it does not yet exist, or updated with the parameters you provide.</p>
      <p>On <code class="ansible-value literal notranslate">absent</code>, the identity provider is removed if it exists.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>&#34;present&#34;</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">&#34;absent&#34;</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-store_token"></div>
      <div class="ansibleOptionAnchor" id="parameter-storeToken"></div>
      <p class="ansible-option-title"><strong>store_token</strong></p>
      <a class="ansibleOptionLink" href="#parameter-store_token" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: storeToken</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Enable/disable whether tokens must be stored after authenticating users.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-token"></div>
      <p class="ansible-option-title"><strong>token</strong></p>
      <a class="ansibleOptionLink" href="#parameter-token" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Authentication token for Keycloak API.</p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-trust_email"></div>
      <div class="ansibleOptionAnchor" id="parameter-trustEmail"></div>
      <p class="ansible-option-title"><strong>trust_email</strong></p>
      <a class="ansibleOptionLink" href="#parameter-trust_email" title="Permalink to this option"></a>
      <p class="ansible-option-type-line"><span class="ansible-option-aliases">aliases: trustEmail</span></p>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>If enabled, email provided by this provider is not verified even if verification is enabled for the realm.</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">true</code></p></li>
      </ul>

    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="parameter-validate_certs"></div>
      <p class="ansible-option-title"><strong>validate_certs</strong></p>
      <a class="ansibleOptionLink" href="#parameter-validate_certs" title="Permalink to this option"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">boolean</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Verify TLS certificates (do not disable this in production).</p>
      <p class="ansible-option-line"><strong class="ansible-option-choices">Choices:</strong></p>
      <ul class="simple">
        <li><p><code class="ansible-value literal notranslate ansible-option-choices-entry">false</code></p></li>
        <li><p><code class="ansible-value literal notranslate ansible-option-default-bold"><strong>true</strong></code> <span class="ansible-option-choices-default-mark">← (default)</span></p></li>
      </ul>

    </div></td>
  </tr>
  </tbody>
  </table>



.. Attributes


Attributes
----------

.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}

.. list-table::
  :width: 100%
  :widths: auto
  :header-rows: 1
  :class: longtable ansible-option-table

  * - Attribute
    - Support
    - Description

  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="attribute-action_group"></div>

      .. _ansible_collections.middleware_automation.keycloak.keycloak_identity_provider_module__attribute-action_group:

      .. rst-class:: ansible-option-title

      **action_group**

      .. raw:: html

        <a class="ansibleOptionLink" href="#attribute-action_group" title="Permalink to this attribute"></a>

      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      :ansible-attribute-support-property:`Action group:` |antsibull-internal-nbsp|:ansible-attribute-support-full:`middleware\_automation.keycloak.keycloak`

      :ansible-option-versionadded:`added in middleware\_automation.keycloak 3.0.0`


      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      Use :literal:`group/middleware\_automation.keycloak.keycloak` in :literal:`module\_defaults` to set defaults for this module.


      .. raw:: html

        </div>


  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="attribute-check_mode"></div>

      .. _ansible_collections.middleware_automation.keycloak.keycloak_identity_provider_module__attribute-check_mode:

      .. rst-class:: ansible-option-title

      **check_mode**

      .. raw:: html

        <a class="ansibleOptionLink" href="#attribute-check_mode" title="Permalink to this attribute"></a>

      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      :ansible-attribute-support-label:`Support: \ `\ :ansible-attribute-support-full:`full`


      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      Can run in :literal:`check\_mode` and return changed status prediction without modifying target.


      .. raw:: html

        </div>


  * - .. raw:: html

        <div class="ansible-option-cell">
        <div class="ansibleOptionAnchor" id="attribute-diff_mode"></div>

      .. _ansible_collections.middleware_automation.keycloak.keycloak_identity_provider_module__attribute-diff_mode:

      .. rst-class:: ansible-option-title

      **diff_mode**

      .. raw:: html

        <a class="ansibleOptionLink" href="#attribute-diff_mode" title="Permalink to this attribute"></a>

      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      :ansible-attribute-support-label:`Support: \ `\ :ansible-attribute-support-full:`full`


      .. raw:: html

        </div>

    - .. raw:: html

        <div class="ansible-option-cell">

      Will return details on what has changed (or possibly needs changing in :literal:`check\_mode`\ ), when in diff mode.


      .. raw:: html

        </div>



.. Notes


.. Seealso


.. Examples

Examples
--------

.. code-block:: yaml+jinja

    - name: Create OIDC identity provider, authentication with credentials
      middleware_automation.keycloak.keycloak_identity_provider:
        state: present
        auth_keycloak_url: https://auth.example.com
        auth_realm: master
        auth_username: admin
        auth_password: admin
        realm: myrealm
        alias: oidc-idp
        display_name: OpenID Connect IdP
        enabled: true
        provider_id: oidc
        config:
          issuer: https://idp.example.com
          authorizationUrl: https://idp.example.com
          tokenUrl: https://idp.example.com/token
          userInfoUrl: https://idp.example.com/userinfo
          clientAuthMethod: client_secret_post
          clientId: my-client
          clientSecret: secret
          syncMode: FORCE
        mappers:
          - name: first_name
            identityProviderMapper: oidc-user-attribute-idp-mapper
            config:
              claim: first_name
              user.attribute: first_name
              syncMode: INHERIT
          - name: last_name
            identityProviderMapper: oidc-user-attribute-idp-mapper
            config:
              claim: last_name
              user.attribute: last_name
              syncMode: INHERIT

    - name: Create OIDC identity provider, with well-known configuration URL
      middleware_automation.keycloak.keycloak_identity_provider:
        state: present
        auth_keycloak_url: https://auth.example.com
        auth_realm: master
        auth_username: admin
        auth_password: admin
        realm: myrealm
        alias: oidc-idp
        display_name: OpenID Connect IdP
        enabled: true
        provider_id: oidc
        config:
          fromUrl: https://the-idp.example.com/realms/idprealm/.well-known/openid-configuration
          clientAuthMethod: client_secret_post
          clientId: my-client
          clientSecret: secret

    - name: Create SAML identity provider, authentication with credentials
      middleware_automation.keycloak.keycloak_identity_provider:
        state: present
        auth_keycloak_url: https://auth.example.com
        auth_realm: master
        auth_username: admin
        auth_password: admin
        realm: myrealm
        alias: saml-idp
        display_name: SAML IdP
        enabled: true
        provider_id: saml
        config:
          entityId: https://auth.example.com/realms/myrealm
          singleSignOnServiceUrl: https://idp.example.com/login
          wantAuthnRequestsSigned: true
          wantAssertionsSigned: true
        mappers:
          - name: roles
            identityProviderMapper: saml-user-attribute-idp-mapper
            config:
              user.attribute: roles
              attribute.friendly.name: User Roles
              attribute.name: roles
              syncMode: INHERIT

    - name: Create OIDC identity provider, authentication with credentials and advanced claim to group
      middleware_automation.keycloak.keycloak_identity_provider:
        state: present
        auth_keycloak_url: https://auth.example.com
        auth_realm: master
        auth_username: admin
        auth_password: admin
        realm: myrealm
        alias: oidc-idp
        display_name: OpenID Connect IdP
        enabled: true
        provider_id: oidc
        config:
          issuer: https://idp.example.com
          authorizationUrl: https://idp.example.com
          tokenUrl: https://idp.example.com/token
          userInfoUrl: https://idp.example.com/userinfo
          clientAuthMethod: client_secret_post
          clientId: my-client
          clientSecret: secret
          syncMode: FORCE
        mappers:
          - name: group_name
            identityProviderMapper: oidc-advanced-group-idp-mapper
            config:
              claims: '[{"key":"my_key","value":"my_value"}]'
              group: group_name
              syncMode: INHERIT



.. Facts


.. Return values

Return Values
-------------
Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:

.. raw:: html

  <table class="colwidths-auto ansible-option-table docutils align-default" style="width: 100%">
  <thead>
  <tr class="row-odd">
    <th class="head"><p>Key</p></th>
    <th class="head"><p>Description</p></th>
  </tr>
  </thead>
  <tbody>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="return-end_state"></div>
      <p class="ansible-option-title"><strong>end_state</strong></p>
      <a class="ansibleOptionLink" href="#return-end_state" title="Permalink to this return value"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">dictionary</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Representation of identity provider after module execution.</p>
      <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> on success</p>
      <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-value literal notranslate ansible-option-sample">{&#34;addReadTokenRoleOnCreate&#34;: false, &#34;alias&#34;: &#34;my-idp&#34;, &#34;authenticateByDefault&#34;: false, &#34;config&#34;: {&#34;authorizationUrl&#34;: &#34;https://idp.example.com&#34;, &#34;clientAuthMethod&#34;: &#34;client_secret_post&#34;, &#34;clientId&#34;: &#34;my-client&#34;, &#34;clientSecret&#34;: &#34;**********&#34;, &#34;issuer&#34;: &#34;https://idp.example.com&#34;, &#34;tokenUrl&#34;: &#34;https://idp.example.com/token&#34;, &#34;userInfoUrl&#34;: &#34;https://idp.example.com/userinfo&#34;}, &#34;displayName&#34;: &#34;OpenID Connect IdP&#34;, &#34;enabled&#34;: true, &#34;firstBrokerLoginFlowAlias&#34;: &#34;first broker login&#34;, &#34;internalId&#34;: &#34;4d28d7e3-1b80-45bb-8a30-5822bf55aa1c&#34;, &#34;linkOnly&#34;: false, &#34;providerId&#34;: &#34;oidc&#34;, &#34;storeToken&#34;: false, &#34;trustEmail&#34;: false}</code></p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="return-existing"></div>
      <p class="ansible-option-title"><strong>existing</strong></p>
      <a class="ansibleOptionLink" href="#return-existing" title="Permalink to this return value"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">dictionary</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Representation of existing identity provider.</p>
      <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
      <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-value literal notranslate ansible-option-sample">{&#34;addReadTokenRoleOnCreate&#34;: false, &#34;alias&#34;: &#34;my-idp&#34;, &#34;authenticateByDefault&#34;: false, &#34;config&#34;: {&#34;authorizationUrl&#34;: &#34;https://old.example.com&#34;, &#34;clientAuthMethod&#34;: &#34;client_secret_post&#34;, &#34;clientId&#34;: &#34;my-client&#34;, &#34;clientSecret&#34;: &#34;**********&#34;, &#34;issuer&#34;: &#34;https://old.example.com&#34;, &#34;syncMode&#34;: &#34;FORCE&#34;, &#34;tokenUrl&#34;: &#34;https://old.example.com/token&#34;, &#34;userInfoUrl&#34;: &#34;https://old.example.com/userinfo&#34;}, &#34;displayName&#34;: &#34;OpenID Connect IdP&#34;, &#34;enabled&#34;: true, &#34;firstBrokerLoginFlowAlias&#34;: &#34;first broker login&#34;, &#34;internalId&#34;: &#34;4d28d7e3-1b80-45bb-8a30-5822bf55aa1c&#34;, &#34;linkOnly&#34;: false, &#34;providerId&#34;: &#34;oidc&#34;, &#34;storeToken&#34;: false, &#34;trustEmail&#34;: false}</code></p>
    </div></td>
  </tr>
  <tr class="row-even">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="return-msg"></div>
      <p class="ansible-option-title"><strong>msg</strong></p>
      <a class="ansibleOptionLink" href="#return-msg" title="Permalink to this return value"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">string</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Message as to what action was taken.</p>
      <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
      <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-value literal notranslate ansible-option-sample">&#34;Identity provider my-idp has been created&#34;</code></p>
    </div></td>
  </tr>
  <tr class="row-odd">
    <td><div class="ansible-option-cell">
      <div class="ansibleOptionAnchor" id="return-proposed"></div>
      <p class="ansible-option-title"><strong>proposed</strong></p>
      <a class="ansibleOptionLink" href="#return-proposed" title="Permalink to this return value"></a>
      <p class="ansible-option-type-line">
        <span class="ansible-option-type">dictionary</span>
      </p>
    </div></td>
    <td><div class="ansible-option-cell">
      <p>Representation of proposed identity provider.</p>
      <p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> always</p>
      <p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-value literal notranslate ansible-option-sample">{&#34;config&#34;: {&#34;authorizationUrl&#34;: &#34;https://idp.example.com&#34;, &#34;clientAuthMethod&#34;: &#34;client_secret_post&#34;, &#34;clientId&#34;: &#34;my-client&#34;, &#34;clientSecret&#34;: &#34;secret&#34;, &#34;issuer&#34;: &#34;https://idp.example.com&#34;, &#34;tokenUrl&#34;: &#34;https://idp.example.com/token&#34;, &#34;userInfoUrl&#34;: &#34;https://idp.example.com/userinfo&#34;}, &#34;displayName&#34;: &#34;OpenID Connect IdP&#34;, &#34;providerId&#34;: &#34;oidc&#34;}</code></p>
    </div></td>
  </tr>
  </tbody>
  </table>



..  Status (Presently only deprecated)


.. Authors

Authors
~~~~~~~

- Laurent Paumier (@laurpaum)


.. Extra links


.. Parsing errors
