// Module included in the following assemblies:
//
// assembly-using-the-user-operator.adoc

[id='con-ignoring-some-users-in-user-operator-{context}']
= Ignoring specific users

[role="_abstract"]
In some scenarios, you might want to exclude certain users from being managed by the User Operator.
This is useful for the following types of users:

* Special built-in users (for example, `ANONYMOUS` or `*`)
* Internal users managed by other mechanisms

When you exclude users from being managed, the User Operator ignores their:

* ACLs
* Quotas
* SCRAM-SHA credentials

To define which users should be ignored, set the `STRIMZI_IGNORED_USERS_PATTERN` environment variable with a regular expression.
For example, to ignore `ANONYMOUS` or `\*` users, set it to `^\*|ANONYMOUS$`.
You can set the environment variable in your `Kafka` custom resource (`.spec.teplate.entityOperator.userOperatorContainer.env`) or in the `Deployment` resource of your standalone User Operator.

.Example `Kafka` configuration excluding users
[source,yaml,subs=+attributes]
----
apiVersion: {KafkaApiVersion}
kind: Kafka
metadata:
  # ...
spec:
  #...
  entityOperator:
    template:
      userOperatorContainer:
        env:
          - name: STRIMZI_IGNORED_USERS_PATTERN
            value: "^\\*|ANONYMOUS$" # Double \ needed for escaping
  #...
----

.Example standalone `Deployment` configuration excluding users
[source,yaml]
----
apiVersion: apps/v1
kind: Deployment
metadata:
  # ...
spec:
  # ...
  template:
    spec:
      containers:
        - name: strimzi-user-operator
          # ...
          env:
            # ...
            - name: STRIMZI_IGNORED_USERS_PATTERN
              value: "^\\*|ANONYMOUS$" # Double \ needed for escaping
----
