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

CC authorizers #3052

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

CC authorizers #3052

wants to merge 6 commits into from

Conversation

IsaacYangSLA
Copy link
Collaborator

Description

CC authorizers, including ACI (Azure Container Instances w/ skr:2.7 for maa token retrieval), GPU (nvtrust), SNP (AMD), TDX (Intel), Mock (always true).

Rebased to main and tested on Azure ACI.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

count = count + 1
try:
r = requests.post(
"http://localhost:8284/attest/maa",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this ? localhost:8284 ?

token = r.json().get("token")
break
except:
if count > 5:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should 5 be CONSTANT variable, so it can easily changed or configured

except:
if count > 5:
break
time.sleep(2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 sec be a constant variable


.. code-block:: json
GPU_NAMESPACE = "x-nv-gpu"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why hard code this string in the code, should be this be a policy file to be signed ?

super().__init__()
self.verifiers = verifiers
class GPUAuthorizer(CCAuthorizer):
def __init__(self, verifier_url="https://nras.attestation.nvidia.com/v1/attest/gpu", policy_file=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make the URL a variable or pass in from configuration. Although the this is unlikely to change, what if the NRAS URL changes (for example, to v2). we should need to change code and reploy code.

def __init__(self, verifier_url="https://nras.attestation.nvidia.com/v1/attest/gpu", policy_file=None):
self._can_generate = True
self.client = attestation.Attestation()
self.client.set_name("nvflare_node")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is "nvflare_node" ?

Copy link
Collaborator

@chesterxgchen chesterxgchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to make some changes

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 this pull request may close these issues.

2 participants