Tenant Option with encrypted values cannot be deleted

Product/components used and version/fix level:

10.18.0.261 on an Enterprise tenant

Detailed explanation of the problem:

Hi Guys

trying to delete a tenant option

with GET can have a look on the tenant option I want to delete
{
“self”: “https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/credentials.env474374”,
“category”: “sag-global-tenant-management.credentials”,
“value”: “<>”,
“key”: “credentials.env474374”
}

Postman
DELETE

{
“error”: “options/Not Found”,
“message”: “Cannot delete option. : Unable to find option by given key: sag-global-tenant-management.credentials/credentials.env474374”,
“info”: “https://www.cumulocity.com/guides/reference/rest-implementation//#a-name-error-reporting-a-error-reporting
}

C8YCLI
c8y tenantoptions delete --category “sag-global-tenant-management.credentials” --key “credentials.env474374”
? Confirm (job: 1)
Delete tenant option on tenant xxxxxxx
[y] Yes [a] Yes to All [n] No [l] No to All y
2023-11-23T10:57:59.935+0100 ERROR serverError: Cannot delete option. : Unable to find option by given key: sag-global-tenant-management.credentials/credentials.env474374 DELETE https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/credentials.env474374: 404 options/Not Found Cannot delete option. : Unable to find option by given key: sag-global-tenant-management.credentials/credentials.env474374

any idea why I cannot delete this option?

Why would I delete this option? I have 1500 of them and just want to get rid of them,

Error messages / full error message screenshot / log file:

Question related to a free trial, or to a production (customer) instance?

Hi,

The credentials prefix is only used at creation time to tell the system to encrypt the option.
When getting it or deleting it, you should remove that prefix:
https://xxxxxxx.eu-latest.cumulocity.com/tenant/options/sag-global-tenant-management.credentials/env474374

Best regards,

Cyril

Works fine for me…

Maybe it’s something about the value ( I presume you have not posted the actual value).

/tenant/options/sag-global-tenant-management.credentials/env474374

is not working

well the value is a password and encrypted

Strangely after my DELETE looks to have succeeded I can still GET the option.
DELETE agin then gets “options/Not Found”,
Maybe yours has already been deleted and you are trying to delete it again?

I have created a new encrypted tenant.option and deleted … which worked fine

Can you GET it again?

no
it is not accessible

So is it only a problem with category ‘sag-global-tenant-management.credentials’?

I can add an option for ‘xx-xlobal-xenant-xanagement.xredentials’ GET and DELETE it OK, but for the above category it ‘sticks around’.

For the moment I believe these Tenant Options are used of the cumulocity-tenant-option-management-plugin somehow.

On another Enterprise tenant I see the same Tenant Options.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.