# Bug SI-107 - Storage shows as healthy even if audience is misconfigured

Project: Stream Integration Basics
Status: closed
URL: https://community.openproject.org/work_packages/SI-107

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 16.0.0 |
| Observed in versions | 15.4.0 |
| Bug found in version (deprecated) | 15.4.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Login as an admin on QA edge and go to Admin \> Files

2.  Add a new Nextcloud storage

3.  Choose 'SSO through OIDC' as an auth method

4.  Choose 'Define audience manually' and enter `nextcloud-stage`

5.  Chose AMPF and save the storage config

6.  On the right side, click on 'Recheck connection'

### What is the buggy behaviour?

  - Health check shows the storage as healthy

### What is the expected behaviour?

1.  Health should show an error

### Notes

(from Jan, in the comments)

This is a misconfiguration that's possible on Edge or other environments with multiple clients that you can exchange a token for.

In this case the token exchange succeeds (there is a client that you can exchange a token for) but in the end using the token at the storage fails (because you exchanged a token for the wrong client).

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/375044/content">

### Environment information

**OpenProject version**

Core build

[7fdfce2cd574a3ccd6e2a8ffe0a6bb2a46baddfc](https://github.com/opf/openproject/commits/7fdfce2cd574a3ccd6e2a8ffe0a6bb2a46baddfc)

Product version

[c32c642cd2201e798210c2ddb73f1358c34aa61e](https://github.com/opf/saas-openproject/commits/c32c642cd2201e798210c2ddb73f1358c34aa61e)

Core version

OpenProject 15.5.0

**Browser**

- [ ] Chrome
- [x] Firefox 136.0
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [x] Windows 11Pro
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
