OS_APPLICATION_CREDENTIAL_NAME not working?

Hi there,

I’m on OpenStack environnement and I try to use the env variable to store backup in SWIFT.
According to the documentation I can use the following env variables:

# For keystone v3 application credential authentication (application credential name)
$ export OS_AUTH_URL=<MY_AUTH_URL>
$ export OS_USERNAME=<MY_USERNAME>
$ export OS_USER_DOMAIN_NAME=<MY_DOMAIN_NAME>
$ export OS_APPLICATION_CREDENTIAL_NAME=<MY_APPLICATION_CREDENTIAL_NAME>
$ export OS_APPLICATION_CREDENTIAL_SECRET=<MY_APPLICATION_CREDENTIAL_SECRET>

Restic version: restic 0.14.0

I made a credential application user, let’s say:

openstack application credential create --secret mysupersecretkey --restricted restic

So I build the following env file that I source:

# Configuration pour l'accès au nuage primaire
export OS_AUTH_URL="https://my.cloud.url:5000/v3"
export OS_REGION_NAME="RegionOne"
export OS_APPLICATION_CREDENTIAL_NAME="restic"
export OS_APPLICATION_CREDENTIAL_SECRET="mysupersecretkey"
export OS_USER_DOMAIN_NAME="Default"
export OS_PROJECT_NAME="myProjetName"
export RESTIC_PASSWORD="myResticCryptPasswd"

And I got this error on each restic call:

Fatal: unable to open repository at swift:postgresql:/backup/myProjetName: conn.Authenticate: UserID or Name should be provided

The line in my script is:

restic -r swift:${SWIFT_BUCKET_NAME}:/${SWIFT_FOLDER_NAME} init

Finally when I replace OS_APPLICATION_CREDENTIAL_NAME by OS_APPLICATION_CREDENTIAL_ID (with the value of the id given by the OpenStack previous command) and it works.

As anyone have a clue on why Name does not work and UserID does?

Thanks

The documentation at Preparing a new repository — restic 0.15.2 documentation states that OS_APPLICATION_CREDENTIAL_NAME must be combined with OS_USERNAME.
Apparently, the application credential name is bound to a specific user. I don’t know enough about the openstack authentication to say whether that’s mandated by OpenStack or a limitation of the library uswd by restic to access Swift.

Hello @MichaelEischer,
You are completely right ! I add OS_USERNAME and it’s working now with OS_APPLICATION_CREDENTIAL_NAME.
Thanks a lot for the help. I close the request.

Damien