trust remaining_uses decrement by 2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Expired
|
Undecided
|
Unassigned |
Bug Description
After setting the remaining_uses to a positive value e.g. 100, the remaining_uses are being decremented twice upon each use of the trust.
#create trust while logged in with admin
openstack trust create --project demo --role admin admin demo
#Set remaining uses on trust
mysql -e 'update keystone.trust set remaining_uses=100'
#With env's set to to the demo user:
stack@ubuntu-
+------
| Field | Value |
+------
| deleted_at | None |
| expires_at | None |
| id | 9338333bc185421
| impersonation | False |
| project_id | c9082a59cc66437
| redelegation_count | 0 |
| remaining_uses | 98 |
| roles | admin |
| trustee_user_id | d569f0d606bf47e
| trustor_user_id | c73ac9ac2e7b48a
+------
stack@ubuntu-
+------
| Field | Value |
+------
| remaining_uses | 96 |
+------
stack@ubuntu-
+------
| Field | Value |
+------
| remaining_uses | 94 |
+------
description: | updated |
Is there a specific reason why remaining_uses is being modified directly in SQL when it's possible specify it on the trust creation? Is it possible to recreate this using only the API [0]?
[0] https:/ /developer. openstack. org/api- ref/identity/ v3-ext/ index.html# os-trust- api