-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set-TssSecret split into other commands? #12
Comments
@thycotic-ps/professional-services @thycotic-ps/sales-engineers Looking for input on anyone's thoughts. Options:
|
I'd rather have 1 really long command than have to call a number of cmdlets to change multiple things. |
Ah, yeah...that's a good point toward ease of use. |
Found a fairly clean way to do this and think it will be manageable. The test for this function will likely be one of the longest in the whole module 😆 😢 Some settings for secrets will be put in the Update command ( #14 ) even though they likely could be put in this one it seems fitting that the few settings that change the "state" go under the Update verb. |
I am finding that we have many endpoints to deal with on properties with secrets:
Field updates can be done in multiple ways:
PUT /secrets/:id/fields/:slug
PATCH /secrets/:id/general
PUT /secrets/:id
While properties have a similar issue, but certain properties fall only under certain endpoints:
PUT /secrets/:id
- common properties (but not all)PATCH /secrets/:id/email
- email propertiessendEmailWhenChanged
,sendEmailWhenHeartbeatFails
, andsendEmailWhenViewed
PATCH /secrets/:id/general
- some general properties such asactive
,folder
(this will move it to another folder),generateSshKeys
,enableInheritSecretPolicy
,site
, and eventemplate
PATCH /secrets/:id/security-checkout
- this one hascheckOutChangePasswordEnabled
,checkOutEnabled
, andcheckOutIntervalMinutes
PATCH /secrets/:id/security-general
- hasdoubleLockId
,enableDoubleLock
,hideLauncherPassword
,proxyEnabled
,requiresComment
, andsessionRecordingEnabled
Having all of the above supported within just
Set-TssSecret
could be done, but it would involve expanding the parameter list a large bit. If I break it out into other commands to make the test more manageable it could also be considered whether to use a different verb (i.e.,Update-TssSecret
orEdit-TssSecret
). Edit, may work better as it relates to the permission that is required as a minimum?Each endpoint above also has varying output but from the perspective of the command itself, you generally will see commands that change or update data only return true or false to indicate they were successful or not.
So the option would be to either expand the command as-is to just have dozens of properties which give the advantage of discovering what can be set on a secret:
Examples if I kept this as one command:
The text was updated successfully, but these errors were encountered: