Skip to content
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-TppAttribute uses int and not string for 'config/Write' #145

Closed
wilddev65 opened this issue Sep 28, 2022 · 4 comments · Fixed by #161
Closed

Set-TppAttribute uses int and not string for 'config/Write' #145

wilddev65 opened this issue Sep 28, 2022 · 4 comments · Fixed by #161
Assignees

Comments

@wilddev65
Copy link
Collaborator

When developing the Add-TppAdaptableHash function, which uses Set-TppAttribute, the result back from adding a new secret store entry is a VaultID number. This is interpreted by Set-TppAttribute as an [int] type when passed to both 'config/WritePolicy' and 'config/Write'. It appears that when 'config/WritePolicy' is used, the value passed in the Values parameter has to be a string for it to work, or a 500 error is generated.
It would probably be the best approach to make sure the parameters used for both endpoints are cast to be strings, to avoid this kind of issue.

@wilddev65 wilddev65 changed the title Set-TppAttribute uses int and not string for 'config/WritePolicy' Set-TppAttribute uses int and not string for 'config/Write' Sep 29, 2022
@wilddev65
Copy link
Collaborator Author

Changing the title as from testing in Postman, it's 'config/Write' that fails with the 500 error. Am also opening a ticket on the Venafi side for this to see if we can find out what is the correct behaviour

@gdbarron
Copy link
Collaborator

@wilddev65 were you able to find out the correct behavior?

@wilddev65
Copy link
Collaborator Author

Nope, was added to JIRA and doesn't appear anyone looked at it.

@wilddev65
Copy link
Collaborator Author

I've been told that as this is a minor issue it probably won't get looked at. Up to you if you want to just close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants