owncloud / owncloud/ocis

Resetting service user password can lock out admin login after restart

Open
#12,569 1 comment 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

JIRA: [OCISDEV-1053](https://kiteworks.atlassian.net/browse/OCISDEV-1053)
---

## Describe the bug
After changing the `reva` service user password with the CLI, restarting oCIS can make normal admin login fail.

## Steps to reproduce
1. Initialize and start oCIS.
`IDM_ADMIN_PASSWORD=admin ocis/bin/ocis init --insecure true`
`OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true ocis/bin/ocis server`
2. Confirm login works with `admin:admin` (UI or Graph API).
`curl -kv "https://localhost:9200/graph/v1.0/me/drives" -uadmin:admin | jq`
Expected/Observed before reset:
```
< HTTP/1.1 200 OK
...
{
"value": [ ... drives ... ]
}
```
3. Stop server and reset service user password: `ocis idm resetpassword -u reva --user-type service`
4. Start server again.
5. Try login again with `admin:admin`.
Observed after reset:
```
< HTTP/1.1 401 Unauthorized
< Www-Authenticate: Bearer realm="localhost:9200", charset="UTF-8"
< Www-Authenticate: Basic realm="localhost:9200", charset="UTF-8"
```

## Expected behavior
- Resetting service user password should not break regular admin login after restart.

## Actual behavior
- Admin login fails.
- Graph API call with basic auth returns `401 Unauthorized`.
- UI may show "Not logged in" / unauthorized state and redirects to `/access-denied` route.

## Additional context
Reproduced without ociswrapper as well (direct `ocis server` run), so this is not wrapper-specific.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `ocis idm resetpassword -u reva --user-type service`, `ocis server`, and the Graph API request shown in the issue. Trace how the resetpassword command and server restart affect admin basic authentication; done means `admin:admin` continues to receive 200 OK after the restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.