// Module included in the following assemblies:
//
// * authentication/sd-configuring-identity-providers.adoc

:_mod-docs-content-type: PROCEDURE
ifeval::["{context}" == "config-identity-providers"]
:osd-distro:
endif::[]
ifeval::["{context}" == "rosa-sts-config-identity-providers"]
:rosa-distro:
endif::[]
ifeval::["{context}" == "rosa-config-identity-providers"]
:rosa-distro:
endif::[]

[id="rosa-config-htpasswd-idp-cli-file_{context}"]
= Configure an htpasswd identity provider with an htpasswd file

[role="_abstract"]
You can create an htpasswd identity provider (IDP) with the {rosa-cli-first} tool and a well-formed htpasswd file.

.Prerequisites

* You have installed and configured the latest version of the {rosa-cli}.

.Procedure

* Create a text file with a new row for each set of credentials with the username and password being colon separated as in the following example:
+
[source,text]
----
johndoe:$apr1$hRY7OJWH$km1EYH.UIRj00000000/
janedoe:$apr1$Q58SO804$B/fECNWfn5F00000000/
----
+
[NOTE]
====
The htpasswd file is encrypted using APR1 hashing. For more information, see "Apache Password Formats" in the _Additional resources_.
====
+
[source,terminal]
----
$ rosa create idp --type=htpasswd -c <cluster_name> --from-file=myhtpassfile.txt
----

ifeval::["{context}" == "config-identity-providers"]
:!osd-distro:
endif::[]
ifeval::["{context}" == "rosa-sts-config-identity-providers"]
:!rosa-distro:
endif::[]
ifeval::["{context}" == "rosa-config-identity-providers"]
:!rosa-distro:
endif::[]
