// Module included in the following assemblies:
//
// assembly-deploying-auth-services.adoc

[id='proc-deploying-standard-auth-service-{context}']
= Deploying the `standard` authentication service

.Procedure

. (Optional) If you want to deploy to a namespace other than `{ProductNamespace}` you must run the following command:
+
[options="nowrap",subs="+quotes,attributes"]
----
sed -i 's/{ProductNamespace}/_my-namespace_/' install/components/standard-authservice/\*RoleBinding*.yaml
----


ifeval::["{cmdcli}" == "kubectl"]
. Create a certificate to use with the `standard` authentication service. For testing purposes, you can create a self-signed certificate:
+
[options="nowrap",subs="+quotes,attributes"]
----
mkdir -p standard-authservice-cert
openssl req -new -x509 -batch -nodes -days 11000 -subj "/O=io.enmasse/CN=standard-authservice._{ProductNamespace}_.svc.cluster.local" -out standard-authservice-cert/tls.crt -keyout standard-authservice-cert/tls.key
----

. Create a secret with the `standard` authentication service certificate:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create secret tls standard-authservice-cert --cert=standard-authservice-cert/tls.crt --key=standard-authservice-cert/tls.key
----
endif::[]

. Create the `standard` authentication service:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create -f ./install/components/standard-authservice
----

