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

Error when querying for current attestation policy #3937

Closed
csegarragonz opened this issue Oct 4, 2021 · 3 comments
Closed

Error when querying for current attestation policy #3937

csegarragonz opened this issue Oct 4, 2021 · 3 comments
Assignees
Labels
Attestation customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.

Comments

@csegarragonz
Copy link

Describe the bug

Command Name
az attestation policy show Extension Name: attestation. Version: 0.2.0.

Errors:

The command failed with an unexpected error. Here is the traceback:
It is required that you pass in a value for the "algorithms" argument when calling decode().
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/home/csegarra/.azure/cliextensions/attestation/azext_attestation/manual/custom.py", line 191, in get_policy
    policy = jwt.decode(token, verify=False).get('x-ms-policy', '')
  File "/opt/az/lib/python3.6/site-packages/jwt/api_jwt.py", line 119, in decode
    decoded = self.decode_complete(jwt, key, algorithms, options, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/jwt/api_jwt.py", line 87, in decode_complete
    'It is required that you pass in a value for the "algorithms" argument when calling decode().'
jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az attestation policy show --resource-group {} --name {} --attestation-type {}

Expected Behavior

Environment Summary

Linux-4.15.0-96-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.27.2

Extensions:
attestation 0.2.0

Additional Context

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Oct 4, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Oct 4, 2021
@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Oct 4, 2021
@ghost
Copy link

ghost commented Oct 4, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @anilba06.

Issue Details

Describe the bug

Command Name
az attestation policy show Extension Name: attestation. Version: 0.2.0.

Errors:

The command failed with an unexpected error. Here is the traceback:
It is required that you pass in a value for the "algorithms" argument when calling decode().
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/home/csegarra/.azure/cliextensions/attestation/azext_attestation/manual/custom.py", line 191, in get_policy
    policy = jwt.decode(token, verify=False).get('x-ms-policy', '')
  File "/opt/az/lib/python3.6/site-packages/jwt/api_jwt.py", line 119, in decode
    decoded = self.decode_complete(jwt, key, algorithms, options, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/jwt/api_jwt.py", line 87, in decode_complete
    'It is required that you pass in a value for the "algorithms" argument when calling decode().'
jwt.exceptions.DecodeError: It is required that you pass in a value for the "algorithms" argument when calling decode().

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az attestation policy show --resource-group {} --name {} --attestation-type {}

Expected Behavior

Environment Summary

Linux-4.15.0-96-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.27.2

Extensions:
attestation 0.2.0

Additional Context

Author: csegarragonz
Assignees: -
Labels:

customer-reported, Service Attention, Attestation

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Oct 4, 2021

route to service team

@jsntcy
Copy link
Member

jsntcy commented Apr 27, 2022

@csegarragonz, could you please check the version of pyjwt on your machine? There are some breaking changes since pyjwt 2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attestation customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team.
Projects
None yet
3 participants