containers / containers/podman-compose
uid, gid, and mode are not supported for secrets
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Create the following snippet to use secrets in a restricted way:
```yaml
services:
postgresql:
image: registry.opensuse.org/opensuse/postgres:latest
secrets:
- source: postgresql_password
target: postgresql_password
uid: "postgres"
gid: "postgres"
mode: 0400
required: true
secrets:
postgresql_password:
file: password.txt
```
**Expected behavior**
Secret is created with the specified UID and mode.
**Actual behavior**
```
WARNING:podman_compose:WARNING: Service postgresql uses secret postgresql_password with uid, gid, or mode. These fields are not supported by this implementation of the Compose file
```
**Environment**
```
Linux
podman-compose version 1.5.0
podman version 5.4.2
```
Contributor guide
Research direction
Reproduce the warning with the YAML snippet on Linux using podman-compose 1.5.0 and Podman 5.4.2. Locate the secret-handling path that emits the unsupported-fields warning, then trace how uid, gid, and mode are passed to secret creation; done means the specified ownership and 0400 mode are applied without the warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100