# Configure local authentication via API?

**URL:** https://forums.suse.com/t/configure-local-authentication-via-api/615
**Category:** Rancher 1.x
**Created:** [October 2, 2015, 2:46pm UTC](https://forums.suse.com/t/configure-local-authentication-via-api/615 "2015-10-02T14:46:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MitchGerdisch](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@MitchGerdisch](https://forums.suse.com/u/MitchGerdisch)
#### Post date: [October 2, 2015, 2:46pm UTC](https://forums.suse.com/t/configure-local-authentication-via-api/615/1 "2015-10-02T14:46:48Z")

</div>

Is it possible to use the API to configure local authentication?  
Basically I want to use the API to automate the steps done via the /admin/access/local UI page.

---

<div class="post-metadata">

### Author: ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)
#### Post date: [October 2, 2015, 5:13pm UTC](https://forums.suse.com/t/configure-local-authentication-via-api/615/2 "2015-10-02T17:13:11Z")

</div>

Everything in the UI is just an API call so this shouldn’t be an issue, but I’d need @vincent to provide the real response.

---

<div class="post-metadata">

### Author: ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)
#### Post date: [October 2, 2015, 7:52pm UTC](https://forums.suse.com/t/configure-local-authentication-via-api/615/3 "2015-10-02T19:52:24Z")

</div>

Enabling auth is a `POST` to `/v1/localAuthConfig` with

```javascript
{
  "type": "localAuthConfig",
  "accessMode": "unrestricted",
  "enabled": true,
  "name": "John Smith",
  "username": "jsmith",
  "password": "hunter2"
}

```

You will probably want to create an API key for the project and/or user first though, once it’s enabled you won’t be able to do anything else without one.
