Skip to content

Not reading security scope for Get-VdcPermission and Set-VdcPermission functions��#375

@shawnkeating

Description

@shawnkeating

Environment

Windows 11

Full Operating System:
VenafiPS version: 6.12.8
PowerShell version: 5.1
TLSPDC version (if applicable): 25.3

Steps to reproduce

Request or set permissions using Get-VdcPermission / Set-VdcPermission using a security token acquired outside the session (but contains the security:manage,delete scope.

Expected behavior

Get the permission object I request back or set the permissions I specify

Actual behavior

Throws errors:
Set-VdcPermission requires a token scope of 'security=manage'. Call New-VenafiSession with the correct scope.
Get-VdcPermission requires a token scope of 'security=$null'. Call New-VenafiSession with the correct scope.

Screenshots

JSON response from my token request (token value removed) to show the scope attached to it.

{
"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"refresh_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"expires_in": 7775999,
"expires": 1776938772,
"token_type": "Bearer",
"scope": "certificate:approve,delete,discover,manage,revoke;configuration:delete,manage;security:delete,manage",
"identity": xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
"refresh_until": 1800698772

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions