-
Notifications
You must be signed in to change notification settings - Fork 6
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
[WIP] Enabling host certificate #13
base: integration
Are you sure you want to change the base?
Conversation
CinziaLu
commented
Sep 16, 2016
- Enabled host certificate to get a token;
- Added CS API;
- CStest : script used to test the code:
- CS API to contact the CS using a token. - CS API test script
@@ -140,7 +147,11 @@ def __clientCredentialsRequest( self ): | |||
if not credDict[ 'validDN' ]: | |||
return WErr( 401, "Unknown DN %s" % DN ) | |||
#Check group | |||
result = self.__getGroups( DN ) | |||
if credDict.has_key( 'group' ): |
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.
if 'group' in credDict
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.
ok
import types | ||
import os | ||
import shutil | ||
import json |
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.
None of the above imports is needed
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.
Yes, right. I need to finish the implementation.
I should have write on the PR "only for discussion" since I did it only to get you know how I was proceeding.
import shutil | ||
import json | ||
from tornado import web, gen | ||
from RESTDIRAC.RESTSystem.Base.RESTHandler import WErr, WOK, TmpDir, RESTHandler |
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.
Only RESTHandler is needed
elif reqType == "Options": | ||
return self.OptionsAction() | ||
elif reqType == "Value": | ||
return self.ValueAction() |
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.
I don't so much get the code, but IIUC, out of the above, only "ValueAction" is implemented.
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.
Yes, I need to finish the implementation.
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.
I marked this as a "WIP" (Work In progress) PR, when finished please remove the tag
@@ -0,0 +1,38 @@ | |||
import requests |
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.
The content of this file is a bit too "personal". Please add at least some explanations on what it's for.
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.
I'll do it.
@chaen do you want this PR too? Since you are looking into it. |
I am not really sure what this is meant to be. I did not need it for my tests |