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

[WIP] Enabling host certificate #13

Open
wants to merge 3 commits into
base: integration
Choose a base branch
from

Conversation

CinziaLu
Copy link

  • 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' ):
Copy link

Choose a reason for hiding this comment

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

if 'group' in credDict

Copy link
Author

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
Copy link

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

Copy link
Author

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
Copy link

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()
Copy link

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.

Copy link
Author

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.

Copy link

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
Copy link

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.

Copy link
Author

Choose a reason for hiding this comment

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

I'll do it.

@fstagni fstagni changed the title Enabling host certificate [WIP] Enabling host certificate Oct 20, 2016
@fstagni
Copy link

fstagni commented Oct 26, 2017

@chaen do you want this PR too? Since you are looking into it.

@chaen
Copy link

chaen commented Oct 26, 2017

I am not really sure what this is meant to be. I did not need it for my tests

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.

3 participants