> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/ja/she-ding/overleaf-toolkit/authentication.md).

# 認証

この機能は以下によって開発されました [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep)。3つの認証方法がサポートされています。設定後、以下のオプションでログインできます。下の画像に示すとおりです。

<figure><img src="/files/1afa81d6c9060f5bf80e1ef0c300aa2d97ef463a" alt=""><figcaption></figcaption></figure>

OIDCの使用を強く推奨します。これは最も汎用的な方法だからです。

{% columns %}
{% column width="50%" %}
{% content-ref url="/pages/07d0a07a47aa011e72282cfe1376a3b26cb30a77" %}
[OIDC 認証](/on-premises/ja/she-ding/overleaf-toolkit/authentication/oidc-authentication.md)
{% endcontent-ref %}

{% content-ref url="/pages/3a4dc00c95513d0b696cec554b2b2b635be328a3" %}
[LDAP 認証](/on-premises/ja/she-ding/overleaf-toolkit/authentication/ldap-authentication.md)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="/pages/00c22f2ae9434ce5d944957668599dc87d6e06c9" %}
[SAML 認証](/on-premises/ja/she-ding/overleaf-toolkit/authentication/saml-authentication.md)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}

### グローバル設定

環境変数 `EXTERNAL_AUTH` 特定の認証モジュールを有効にするために必要です。この環境変数は、どの外部認証方法を有効化するかを指定します。利用可能なオプション（小文字）は次のとおりです：

* saml
* ldap
* oidc

### SSOの提案

Overleafでsaml、ldap、oauthをテストしました。samlとoauthはどちらもOverleafでうまく動作しますが、ldapは場合によります。うまく動作しません。 <https://docs.goauthentik.io/>、ただし openLDAP ではうまく動作します（<https://github.com/rroemhild/docker-test-openldap>).

{% hint style="info" %}
passport-ldapauth を更新する必要があります。最近、私は次を使って Overleaf の LDAP をテストしようとしています <https://goauthentik.io/> 、失敗しました。"passport-ldapauth" を 3.0.0 に更新した後は、すべてうまく動作しました。

```
"passport-ldapauth": "^3.0.0",
```

元々のものは 2.x.x で、6年前のものです。
{% endhint %}

理由はよく分かりません。LDAP（saml、oauthも同様）の認証は、私たちは皆、外部パッケージに依存しているからです。もし動作しなければ、Overleaf Server Proでも状況は同じかもしれません。というのも、私たちはすべての環境変数を内部パッケージに渡しているだけで、もしバグがあっても、現時点では分からないからです。

**そのため、SSOをすべてのソースコードでテストするために、開発環境を構築することをユーザーに強く推奨します**、次の場所で利用できます [Setup Develop Environment (Local)](/dev/environment/setup-develop-environment-local.md)。開発環境では、ターミナルですべてのログを確認できるため、デバッグに便利です。

\ <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/ja/she-ding/overleaf-toolkit/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
