GKE Identity Service lets you use your existing identity providers to
authenticate to the Kubernetes API server of your Google Distributed Cloud clusters. It
supports [OpenID Connect (OIDC)](https://openid.net/connect/) and
[Lightweight Directory Access Protocol (LDAP)](https://ldap.com/)
providers that run on-premises, such as an
[Active Directory Federation Services (ADFS)](https://docs.microsoft.com/en-us/windows-server/identity/active-directory-federation-services)
server, or that are publicly reachable, such as Okta. Provider certificates can
come from either a public or a private certificate authority (CA). You can sign
in to your clusters from the command line with any provider, or from the
Google Cloud console with OIDC only.

For an overview of how GKE Identity Service works, see
[Introducing GKE Identity Service](https://docs.cloud.google.com/anthos/identity). If you want to use
Google IDs to sign in to your GKE clusters instead of an OIDC or LDAP
provider, we recommend the Connect gateway. For more information, see
[Connecting to registered clusters with the Connect gateway](https://docs.cloud.google.com/anthos/multicluster-management/gateway).

## How GKE Identity Service handles requests

GKE Identity Service runs as a Pod inside the cluster control plane. During
cluster lifecycle phases, the API server is dynamically configured to use the
in-cluster GKE Identity Service as the authentication webhook for all
incoming requests. The API server
[isn't able to use in-cluster DNS](https://github.com/kubernetes/minikube/issues/3772).
As a result, the API server is configured to access GKE Identity Service as a
REST resource. In audit logs, this invocation is recorded as a `CREATE` request
to the Services or proxy resource by a `system:anonymous` user.

## Setup process and options

The steps to set up GKE Identity Service depend on your identity
provider. For OIDC providers, you register GKE Identity Service with
your provider, configure your clusters at the fleet level or individually, and
then set up user access. For LDAP providers, you follow a single setup guide.

### OIDC

1. Register GKE Identity Service as a client with your OIDC provider following the instructions in [Configuring providers for GKE Identity Service](https://docs.cloud.google.com/anthos/identity/setup/provider).

2. Choose from the following cluster configuration options:

   - Configure your clusters at fleet level following the instructions in [Configuring clusters for fleet-level GKE Identity Service](https://docs.cloud.google.com/anthos/identity/setup/fleet-cluster) (preview, Google Distributed Cloud version 1.8 and higher). With this option, your authentication configuration is centrally managed by Google Cloud.
   - Configure your clusters individually following the instructions in [Configuring clusters for GKE Identity Service with OIDC](https://docs.cloud.google.com/anthos/identity/setup/per-cluster). Because fleet-level setup is a preview feature, you may want to use this option in production environments, if you are using an earlier version of Google Distributed Cloud, or if you require GKE Identity Service features that aren't yet supported with fleet-level lifecycle management.
3. Set up user access to your clusters, including role-based access control (RBAC), following the instructions in [Setting up user access for GKE Identity Service](https://docs.cloud.google.com/anthos/identity/setup/user-access).

### LDAP

- Follow the instructions in [Set up GKE Identity Service with LDAP](https://docs.cloud.google.com/anthos/identity/setup/ldap).

## Accessing clusters

After GKE Identity Service has been set up, users can log in to configured clusters using either the command line or the Google Cloud console.

- Learn how to log in to registered clusters with your OIDC or LDAP ID in [Accessing clusters using GKE Identity Service](https://docs.cloud.google.com/anthos/identity/accessing).
- Learn how to log in to clusters from the Google Cloud console in [Logging in to a cluster from the Google Cloud console](https://docs.cloud.google.com/anthos/multicluster-management/console/logging-in) (OIDC only).

## Troubleshoot the login flow

To troubleshoot [login flows that authenticate directly on the
GKE Identity Service server with a fully qualified domain name
(FQDN)](https://docs.cloud.google.com/kubernetes-engine/enterprise/identity/setup/authenticate-fqdn-access),
you can use the GKE Identity Service diagnostic utility. The diagnostic
utility simulates login flows with your OIDC provider to quickly identify
configuration problems. This tool requires a version 1.32 or higher cluster and
only supports OIDC. For more information, see [GKE Identity Service
diagnostic
utility](https://docs.cloud.google.com/kubernetes-engine/enterprise/identity/setup/anthos-v2-diagnostic-utility).