From: Thierry Parmentelat Date: Fri, 3 Jul 2009 12:07:29 +0000 (+0000) Subject: shape the sfa.trust subpackage X-Git-Tag: sfa-0.9-0@14641~187 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=fbe847fbea237fc77f95fffb3766bc85b953841a shape the sfa.trust subpackage --- diff --git a/CHANGES-0.2-to-0.8.txt b/CHANGES-0.2-to-0.8.txt index b7a43c3e..00646320 100644 --- a/CHANGES-0.2-to-0.8.txt +++ b/CHANGES-0.2-to-0.8.txt @@ -1,4 +1,6 @@ +==================== changes between 0.2 and 0.8 from a user's perspective +==================== -------------------- - 3 packages named @@ -22,10 +24,33 @@ geni-config-tty -> sfa-config-tty /etc/sfa/registries.xml are now preserved across rpm updates + +==================== +changes between 0.2 and 0.8 from a devel's perspective +==================== + +cmdline/ has moved to + sfa/client +first-class objects involved in the server side + sfa/server +plc-dependent code has moved to + sfa/plc +basic identification/authentication objects (up to credentials) have moved to + sfa/trust + (this also holds in trusted_roots the CA certs of PLC-PLE) +code for the methods have remained in + sfa/methods + +init.d instscript is now in + sfa/init.d + +config files and utilities are in + config/ + (should this move under sfa ?) + -------------------- deprecated gacks/ gui/ dummy/ -nuke.py -alt_aggregate.py +some apparently test-related stuff formerly in cmdline hace moved to tests/client diff --git a/geni/client/genidump.py b/geni/client/genidump.py index 99812cd9..49365ed5 100644 --- a/geni/client/genidump.py +++ b/geni/client/genidump.py @@ -8,15 +8,15 @@ import xmlrpclib from types import StringTypes, ListType from optparse import OptionParser -from geni.util.certificate import Keypair, Certificate -from geni.util.credential import Credential +from geni.trust.certificate import Keypair, Certificate +from geni.trust.credential import Credential from geni.util.geniclient import GeniClient, ServerException -from geni.util.gid import create_uuid +from geni.trust.gid import create_uuid from geni.util.record import GeniRecord from geni.util.rspec import Rspec def determine_geni_filekind(fn): - from geni.util.certificate import Certificate + from geni.trust.certificate import Certificate cert = Certificate(filename = fn) diff --git a/geni/client/sfi.py b/geni/client/sfi.py index 211213f2..c09842e5 100755 --- a/geni/client/sfi.py +++ b/geni/client/sfi.py @@ -9,10 +9,10 @@ import tempfile from types import StringTypes, ListType from optparse import OptionParser -from geni.util.certificate import Keypair, Certificate -from geni.util.credential import Credential +from geni.trust.certificate import Keypair, Certificate +from geni.trust.credential import Credential from geni.util.geniclient import GeniClient, ServerException -from geni.util.gid import create_uuid +from geni.trust.gid import create_uuid from geni.util.record import * from geni.util.rspec import Rspec diff --git a/geni/methods/create_gid.py b/geni/methods/create_gid.py index 66552ee6..0a8b54b4 100644 --- a/geni/methods/create_gid.py +++ b/geni/methods/create_gid.py @@ -5,7 +5,7 @@ from geni.util.faults import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth -from geni.util.certificate import Keypair +from geni.trust.certificate import Keypair class create_gid(Method): """ diff --git a/geni/methods/get_credential.py b/geni/methods/get_credential.py index 42e6b640..80195580 100644 --- a/geni/methods/get_credential.py +++ b/geni/methods/get_credential.py @@ -6,8 +6,8 @@ from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth from geni.util.record import GeniRecord -from geni.util.credential import * -from geni.util.rights import * +from geni.trust.credential import * +from geni.trust.rights import * from geni.util.debug import log class get_credential(Method): diff --git a/geni/methods/get_ticket.py b/geni/methods/get_ticket.py index 52573234..9c2062b9 100644 --- a/geni/methods/get_ticket.py +++ b/geni/methods/get_ticket.py @@ -5,7 +5,7 @@ from geni.util.faults import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth -from geni.util.certificate import Keypair +from geni.trust.certificate import Keypair from geni.util.geniticket import * class get_ticket(Method): diff --git a/geni/methods/register.py b/geni/methods/register.py index 7d3c8ad2..aeb47c61 100644 --- a/geni/methods/register.py +++ b/geni/methods/register.py @@ -6,8 +6,8 @@ from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth from geni.util.record import GeniRecord -from geni.util.certificate import Keypair, convert_public_key -from geni.util.gid import * +from geni.trust.certificate import Keypair, convert_public_key +from geni.trust.gid import * from geni.util.debug import log from geni.util.misc import * diff --git a/geni/plc/sfa-import-plc.py b/geni/plc/sfa-import-plc.py index 9a47932b..2035564b 100755 --- a/geni/plc/sfa-import-plc.py +++ b/geni/plc/sfa-import-plc.py @@ -21,8 +21,8 @@ import getopt import sys import tempfile -from geni.util.certificate import * -from geni.util.trustedroot import * +from geni.trust.certificate import * +from geni.trust.trustedroot import * from geni.util.hierarchy import * from geni.util.record import * from geni.util.genitable import * diff --git a/geni/server/sfa-server.py b/geni/server/sfa-server.py index c4e1ddbf..5ce9a470 100644 --- a/geni/server/sfa-server.py +++ b/geni/server/sfa-server.py @@ -38,8 +38,8 @@ import os, os.path from optparse import OptionParser from geni.util.hierarchy import Hierarchy -from geni.util.trustedroot import TrustedRootList -from geni.util.certificate import Keypair, Certificate +from geni.trust.trustedroot import TrustedRootList +from geni.trust.certificate import Keypair, Certificate from geni.util.config import Config from geni.server.registry import Registry diff --git a/geni/util/certificate.py b/geni/trust/certificate.py similarity index 100% rename from geni/util/certificate.py rename to geni/trust/certificate.py diff --git a/geni/util/credential.py b/geni/trust/credential.py similarity index 98% rename from geni/util/credential.py rename to geni/trust/credential.py index 26239da3..bda1b02d 100644 --- a/geni/util/credential.py +++ b/geni/trust/credential.py @@ -10,9 +10,9 @@ import xmlrpclib -from geni.util.certificate import * -from geni.util.rights import * -from geni.util.gid import * +from geni.trust.certificate import * +from geni.trust.rights import * +from geni.trust.gid import * ## # Credential is a tuple: diff --git a/geni/util/gid.py b/geni/trust/gid.py similarity index 99% rename from geni/util/gid.py rename to geni/trust/gid.py index d51cdfc4..711f5434 100644 --- a/geni/util/gid.py +++ b/geni/trust/gid.py @@ -9,7 +9,7 @@ import xmlrpclib import uuid -from geni.util.certificate import * +from geni.trust.certificate import * ## # Create a new uuid. Returns the UUID as a string. diff --git a/geni/util/rights.py b/geni/trust/rights.py similarity index 100% rename from geni/util/rights.py rename to geni/trust/rights.py diff --git a/geni/trust/trusted_certs/plc_ca.crt b/geni/trust/trusted_certs/plc_ca.crt new file mode 100644 index 00000000..840cb29a --- /dev/null +++ b/geni/trust/trusted_certs/plc_ca.crt @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC7DCCAlWgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBoTELMAkGA1UEBhMCVVMx +EzARBgNVBAgTCk5ldyBKZXJzZXkxEjAQBgNVBAcTCVByaW5jZXRvbjESMBAGA1UE +ChMJUGxhbmV0TGFiMRIwEAYDVQQLEwlQbGFuZXRMYWIxGjAYBgNVBAMTEVBsYW5l +dExhYiBSb290IENBMSUwIwYJKoZIhvcNAQkBFhZzdXBwb3J0QHBsYW5ldC1sYWIu +b3JnMB4XDTA0MDIyMzE4MTMyMloXDTE0MDIyMDE4MTMyMlowgaExCzAJBgNVBAYT +AlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRIwEAYDVQQHEwlQcmluY2V0b24xEjAQ +BgNVBAoTCVBsYW5ldExhYjESMBAGA1UECxMJUGxhbmV0TGFiMRowGAYDVQQDExFQ +bGFuZXRMYWIgUm9vdCBDQTElMCMGCSqGSIb3DQEJARYWc3VwcG9ydEBwbGFuZXQt +bGFiLm9yZzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwtpNRNvNmIEX0zDu +JcMc3zLHZz9LuXjH+UqiktPIfiMhh1sUqZE2wDfppcGRLAdC7mrmZys5GjZTO0nf +bU/rV73hplTD8UPZojpbcvKLm5t0kocDG4aoUL+vDF7T8UlXl/T5UF0GWqFey9UY +luCI5UeKMYdyoxhaMGiL8IBK8DUCAwEAAaMyMDAwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQU+DhxfTWp4xeIF2lUWngDOhC1lY8wDQYJKoZIhvcNAQEEBQADgYEA +qYakXhLdtk64ppM1KmjeD0M0bGU+ZFu421MH0whxv5RROgNEwCxXicbD/9FZ2uzo +ik7AdBAiZiyvoEkTxYkzpXHkdM6x0j6iDMjomtihUgkjtM+xaiQ6lqy9h583zhjg +2Te0bEteMD8w8zT3Vdg8AsOPsDRZgHS3TMmTSzDg6nI= +-----END CERTIFICATE----- diff --git a/geni/trust/trusted_certs/ple_ca.crt b/geni/trust/trusted_certs/ple_ca.crt new file mode 100644 index 00000000..cb00a40f --- /dev/null +++ b/geni/trust/trusted_certs/ple_ca.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDODCCAqGgAwIBAgICIAYwDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMCRlIx +GTAXBgNVBAcTEFNvcGhpYSBBbnRpcG9saXMxDjAMBgNVBAoTBUlOUklBMRkwFwYD +VQQLExBQbGFuZXRMYWIgRXVyb3BlMSEwHwYDVQQDExhQbGFuZXRMYWIgRXVyb3Bl +IFJvb3QgQ0EwHhcNMDkwNjE4MTI1NDAwWhcNMTkwNjE2MTI1NDAwWjB2MQswCQYD +VQQGEwJGUjEZMBcGA1UEBxMQU29waGlhIEFudGlwb2xpczEOMAwGA1UEChMFSU5S +SUExGTAXBgNVBAsTEFBsYW5ldExhYiBFdXJvcGUxITAfBgNVBAMTGFBsYW5ldExh +YiBFdXJvcGUgUm9vdCBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxu3l +PiHQVVnkfANCyB+78ZXS0y1Nj2LaoqI/LdSZyKF8JPt+b5fXgOcOWrnNrCrS/9NV +hyX3s4Ps5HuiVxRZi3MPtxeXz5qbU7UH+k/kR9T/Po7DGa0KAP/TmzO3jhV6EalV +1DIkjs6wNZ5Ypv5m6M6puK1LZ+p92yPhePJPftECAwEAAaOB1DCB0TAdBgNVHQ4E +FgQUjbA0nGWCLFZ7L/SiSdvQuMQWhOQwgaEGA1UdIwSBmTCBloAUjbA0nGWCLFZ7 +L/SiSdvQuMQWhOSheqR4MHYxCzAJBgNVBAYTAkZSMRkwFwYDVQQHExBTb3BoaWEg +QW50aXBvbGlzMQ4wDAYDVQQKEwVJTlJJQTEZMBcGA1UECxMQUGxhbmV0TGFiIEV1 +cm9wZTEhMB8GA1UEAxMYUGxhbmV0TGFiIEV1cm9wZSBSb290IENBggIgBjAMBgNV +HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAEZFa4EGGrqGSCZivYCiKiS3vhwP +WQ/84vTXVQr5ydiSc210bIVlPRFqdZAMd64uxdERb90734AVpGAQyBYq1ccA+yCF +v2hW8Cx87XObp0uoL0RniA1qOr3LO69rDJAS7n7EPHhAKjOXUkzb/vvXdIAPmbra +AQGvqcqKX7Fk9+wi +-----END CERTIFICATE----- diff --git a/geni/util/trustedroot.py b/geni/trust/trustedroot.py similarity index 97% rename from geni/util/trustedroot.py rename to geni/trust/trustedroot.py index b41753da..6b131b02 100644 --- a/geni/util/trustedroot.py +++ b/geni/trust/trustedroot.py @@ -3,7 +3,7 @@ import os -from geni.util.gid import * +from geni.trust.gid import * from geni.util.config import Config class TrustedRootList(): diff --git a/geni/util/api.py b/geni/util/api.py index b45d7f63..3acfbf99 100644 --- a/geni/util/api.py +++ b/geni/util/api.py @@ -15,8 +15,8 @@ from geni.util.auth import Auth from geni.util.config import * from geni.util.faults import * from geni.util.debug import * -from geni.util.rights import * -from geni.util.credential import * +from geni.trust.rights import * +from geni.trust.credential import * from geni.util.misc import * # See "2.2 Characters" in the XML specification: diff --git a/geni/util/auth.py b/geni/util/auth.py index 8edef7e4..0849fe09 100644 --- a/geni/util/auth.py +++ b/geni/util/auth.py @@ -8,10 +8,10 @@ import time from geni.util.faults import * -from geni.util.credential import Credential -from geni.util.trustedroot import TrustedRootList +from geni.trust.credential import Credential +from geni.trust.trustedroot import TrustedRootList from geni.util.hierarchy import Hierarchy -from geni.util.rights import RightList +from geni.trust.rights import RightList from geni.util.genitable import * from geni.util.config import * from geni.util.misc import * diff --git a/geni/util/geniclient.py b/geni/util/geniclient.py index 037c8e31..6fbd2068 100644 --- a/geni/util/geniclient.py +++ b/geni/util/geniclient.py @@ -11,8 +11,8 @@ import xmlrpclib -from geni.util.gid import * -from geni.util.credential import * +from geni.trust.gid import * +from geni.trust.credential import * from geni.util.record import * from geni.util.geniticket import * diff --git a/geni/util/geniserver.py b/geni/util/geniserver.py index 2c49cf7f..0273fe21 100644 --- a/geni/util/geniserver.py +++ b/geni/util/geniserver.py @@ -21,8 +21,8 @@ import SimpleXMLRPCServer from OpenSSL import SSL -from geni.util.certificate import * -from geni.util.credential import * +from geni.trust.certificate import * +from geni.trust.credential import * from geni.util.faults import * from geni.util.api import GeniAPI from geni.util.debug import log diff --git a/geni/util/genitable.py b/geni/util/genitable.py index 44f238f7..7a861fd4 100644 --- a/geni/util/genitable.py +++ b/geni/util/genitable.py @@ -11,7 +11,7 @@ import report from pg import DB, ProgrammingError -from geni.util.gid import * +from geni.trust.gid import * from geni.util.record import * from geni.util.debug import * diff --git a/geni/util/geniticket.py b/geni/util/geniticket.py index 28c8d456..3e225636 100644 --- a/geni/util/geniticket.py +++ b/geni/util/geniticket.py @@ -8,9 +8,9 @@ import xmlrpclib -from geni.util.certificate import * -from geni.util.rights import * -from geni.util.gid import * +from geni.trust.certificate import * +from geni.trust.rights import * +from geni.trust.gid import * # Ticket is tuple: # (gidCaller, gidObject, attributes, rspec, delegate) diff --git a/geni/util/hierarchy.py b/geni/util/hierarchy.py index 395c67ca..b38f50f4 100644 --- a/geni/util/hierarchy.py +++ b/geni/util/hierarchy.py @@ -18,9 +18,9 @@ import os import report -from geni.util.certificate import * -from geni.util.credential import * -from geni.util.gid import * +from geni.trust.certificate import * +from geni.trust.credential import * +from geni.trust.gid import * from geni.util.misc import * from geni.util.config import * from geni.util.geniticket import * diff --git a/geni/util/record.py b/geni/util/record.py index a91e6bec..27b6c83d 100644 --- a/geni/util/record.py +++ b/geni/util/record.py @@ -11,7 +11,7 @@ from types import StringTypes import geni.util.report -from geni.util.gid import * +from geni.trust.gid import * from geni.util.rspec import * from geni.util.parameter import * diff --git a/setup.py b/setup.py index c8774168..2d358960 100755 --- a/setup.py +++ b/setup.py @@ -18,8 +18,12 @@ scripts = [ 'config/sfa-config-tty', 'geni/client/genidump.py', ] package_dirs = [ 'geni', - 'geni/util', + 'geni/client', 'geni/methods', + 'geni/plc', + 'geni/server', + 'geni/trust', + 'geni/util', ] data_files = [ ('/etc/sfa/', [ 'config/aggregates.xml', 'config/registries.xml', diff --git a/tests/client/testAggregate.py b/tests/client/testAggregate.py index 2bdc81c6..ef917517 100644 --- a/tests/client/testAggregate.py +++ b/tests/client/testAggregate.py @@ -1,5 +1,5 @@ from geni.util.geniclient import * -from geni.util.credential import * +from geni.trust.credential import * from pprint import pprint cred = Credential(filename = 'tmack.pl.sa.cred')