Problem/Motivation

On some occasions, it is beneficial to disable a key:

E.g. when you are doing some quick (but dangerous) testing with live key credentials and want to be sure, that the key is disabled afterward, but not deleted, as you might do some more (dangerous) live key chenenigans in the future.

There might also be some more serious use cases for this.

Steps to reproduce

Proposed resolution

Add option to disable key (set "status")

Remaining tasks

User interface changes

API changes

Data model changes

Comments

grevil created an issue. See original summary.

ptmkenny’s picture

Version: 4.0.x-dev » 2.0.x-dev

2.x-dev is the active development branch. In many cases, you can override the key value with a config override (via settings.php, for example); what kind of use case do you have in mind where a config override is not sufficient?

grevil’s picture

Hello @ptmkenny, thanks for the reply! :)

I don't want to override the key value. I want to keep it as is, but have the key deactivated, so that other modules or internal logic won't access it anymore. IMO this should be done through the UI, as this should be a "quick action" where I don't want to use the terminal for.

2.x-dev is the active development branch

Can 2.0.x be set as the default branch and 4.0.x get removed? SemVer wise this doesn't make sense.

Thanks in advance!

ptmkenny’s picture

Category: Task » Feature request

I'm not a Key maintainer, so I don't have access to the branches, but yeah, 4.x should probably be hidden. (I replied because I'm organizing Key module issues.)

What I was suggesting is that you can simulate deactivating a key by giving it an invalid value, although depending on what you use the key for, this may break your site (like if you change an Encrypt key value, that would break your encryption, not deactivate the key).

I'm switching this to "Feature request" because key entities have a status field but the Key module ignores it; there is no support for changing the entity status, so a feature would have to be added to support that.

grevil’s picture

@ptmkenny Thank you!

What I was suggesting is that you can simulate deactivating a key by giving it an invalid value, although depending on what you use the key for, this may break your site

Yes I understand, but I want to keep the value while disabling that specific key.