-
Notifications
You must be signed in to change notification settings - Fork 182
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
base: main
Are you sure you want to change the base?
CC authorizers #3052
Conversation
count = count + 1 | ||
try: | ||
r = requests.post( | ||
"http://localhost:8284/attest/maa", |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is "nvflare_node" ?
There was a problem hiding this 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
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
./runtest.sh
.