-
Notifications
You must be signed in to change notification settings - Fork 7
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
TtppObject may fail to parse valid object names #129
Comments
When the object is a Team, fetched via Get-VenafiTeam -All function, it appears to have all the properties present. An error is thrown in both cases.
Getting a Team by passing a known ID does not throw this error. |
This is occurring because :: is a reserved character combination in PowerShell representing a Provider and Split-Path is interpreting it as such. In the module, Policy\Object paths are handled differently from Teams as the Team object is not a path comprised of parent and child name, it is just the name and the path is understood as \ved\identity. We can look to change the way the object is determined from the entire path. With that said, I'm surprised to see a colon being used in a name as I've always seen that as against best practice. |
Environment
Steps to reproduce
Create a team in TPP having a name with colon, for e.g. test::1. Fetching this team via Get-VenafiTeam will throw an error.
Get-VenafiTeam -All
Same can reproduced by creating a policy folder with colon characters in the name then using Get-TppObject to get this folder.
Expected behavior
This object should be fetched without throwing an error.
Actual behaviour
Although the object is fetched, following error is also thrown:
More Info
Split-Path function used by Tpp-Object does not allow all valid characters that can be used in the object names.
The text was updated successfully, but these errors were encountered: