---
title: "create auth source"
method: POST
path: "/open/auth_defense/source"
tags: ["auth"]
---

# create auth source

`POST /open/auth_defense/source`

## Request body

- AuthDefenseCreateSourceReq
  - `association` 0 | 1 | 2
  - `auth` ModelPolicyAuth
    - `cas` ModelPolicyAuthCAS
      - `url` string
    - `ldap` ModelPolicyAuthLDAP
      - `base_dn` string
      - `bind_dn` string
      - `bind_pass` string
      - `filter` string
      - `url` string
    - `oauth2` ModelPolicyAuthOauth2
      - `app_id` string
      - `app_secret` string
      - `extra` object
      - `provider` string
  - `network_proxy` boolean
  - `title` string
  - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

## Response `200`

OK

- object
  - `data` integer
  - `err` string
  - `msg` string

## Changes

- **2026-04-01** `de6007edcff9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/chaitin/apis/mgt-api/changes/open/auth_defense/source/post.md)

---

[API](https://skmtc.dev/chaitin/apis/mgt-api.md) · [All operations](https://skmtc.dev/chaitin/apis/mgt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chaitin/mgt-api/revisions/de6007edcff9/schema)
