# Authentication

### User Authentication

lakeFS authenticates users from a built-in authentication database.

#### Built-in database

The built-in authentication database is always present and active. lakeFS Community holds a single administrator user, created during the initial setup, while lakeFS Enterprise lets you create additional users from the Web UI at Administration / Users.

Users have an access key `AKIA...` and an associated secret access key. These credentials are valid for logging into the Web UI or authenticating programmatic requests to the API Server or the S3 Gateway.

> [!NOTE]
>
> **Info**
>
> On lakeFS Enterprise, the allowed authentication methods can be restricted (for example, disabling access keys in favor of SSO) with [`auth.allowed_authentication_methods`](<https://docs.lakefs.io/reference/enterprise-configuration/index.md#auth>).

#### Single sign-on and external authenticators

lakeFS Community authenticates users only against the built-in database, so its login form accepts the administrator's access key and secret access key and nothing else. lakeFS Enterprise adds [single sign-on](<https://docs.lakefs.io/security/sso/index.md>) through OIDC and SAML, a pluggable [Remote Authenticator](<https://docs.lakefs.io/security/remote-authenticator/index.md>) that delegates the login form to an existing identity service, [AWS IAM role authentication](<https://docs.lakefs.io/security/external-principals-aws/index.md>), and [short-lived tokens](<https://docs.lakefs.io/security/sts-login/index.md>) issued through an identity provider. The [editions comparison](<https://docs.lakefs.io/editions/index.md>) lists which capabilities each edition includes.

### API Server Authentication

Authenticating against the API server is done using a key-pair, passed via [Basic Access Authentication](<https://en.wikipedia.org/wiki/Basic_access_authentication>).

All HTTP requests must carry an `Authorization` header with the following structure:

```text
Authorization: Basic <base64 encoded access_key_id:secret_access_key>
```

For example, assuming my access\_key\_id is `my_access_key_id` and my secret\_access\_key is `my_secret_access_key`, we'd send the following header with every request:

```text
Authorization: Basic bXlfYWNjZXNzX2tleV9pZDpteV9zZWNyZXRfYWNjZXNzX2tleQ==
```

### S3 Gateway Authentication

To provide API compatibility with Amazon S3, authentication with the S3 Gateway supports both [SIGv2](<https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html>) and [SIGv4](<https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html>). Clients such as the AWS SDK that implement these authentication methods should work without modification.

See [this example for authenticating with the AWS CLI](<https://docs.lakefs.io/reference/aws-cli/index.md>).

Clients can also exchange a lakeFS login token or an identity provider JWT for [temporary S3 Gateway credentials](<https://docs.lakefs.io/security/s3-temporary-credentials/index.md>) instead of holding static credentials.

## User permissions

lakeFS Community holds a single administrator user with full access, as described in [Access Control in lakeFS Community](<https://docs.lakefs.io/security/access-control-lists/index.md>). In lakeFS Enterprise, authorization is managed through [groups and policies](<https://docs.lakefs.io/security/rbac/index.md>): users created by single sign-on join the groups configured for the identity provider, and their permissions can then be managed from the Administration pages in the lakeFS UI or with *lakectl*.
