1 / 64

Parallel Systems Special Chapter: Foundations of Grid Computing

Grid Computing Part 2: Security Jens Volkert Dieter Kranzlmüller. Parallel Systems Special Chapter: Foundations of Grid Computing. Overview. Glossary Necessity of security in data networks Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital signatures

rosa
Download Presentation

Parallel Systems Special Chapter: Foundations of Grid Computing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Grid Computing Part 2: Security Jens Volkert Dieter Kranzlmüller Parallel Systems Special Chapter:Foundations of Grid Computing Volkert

  2. Volkert Overview Glossary Necessity of security in data networks Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital signatures X509 certificates Grid Security Basic concepts Grid Security Infrastructure Proxy certificates Command line interfaces Virtual Organization Concept of VO and authorization VOMS, LCAS, LCMAPS C/C++ interfaces (GSS-API, GSS Assist)

  3. Volkert Overview Glossary Necessity of security in data networks Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital signatures X509 certificates Grid Security Basic concepts Grid Security Infrastructure Proxy certificates Command line interfaces Virtual Organization Concept of VO and authorization VOMS, LCAS, LCMAPS C/C++ interfaces (GSS-API, GSS Assist)

  4. Volkert Glossary Principal Partner An entity: Human, program or machine Credentials Some data which prove identity (Particular features, certificates) Authentication Verification of a principal's identity Authorization Assignment of a set of privileges to a principal Confidentiality Messages are encrypted such that only the receiver can understand them Integrity The message is not modified on the way Non-repudiation Impossibility to deny the authenticity of a digital signature

  5. Volkert Overview Glossary Necessity of security in data networks Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital signatures X509 certificates Grid Security Basic concepts Grid Security Infrastructure Proxy certificates Command line interfaces Virtual Organization Concept of VO and authorization VOMS, LCAS, LCMAPS C/C++ interfaces (GSS-API, GSS Assist)

  6. Volkert Situation: View here Here: Grid = connected LANs Someone (principal) communicates with a partner somwhere in the Grid

  7. Volkert Requirements No unauthorized person is allowed to read or modify the exchanged information The partner at the other end should be the one which pretends to be The partner should be trustworthy, even when no contact existed until now Authentication Certifying identity or trustworthiness of the partner or of the provided particular features Furthermore: The partner has the same rights A principal must do something for it

  8. Volkert Principle: Any resource sharing is voluntary Each resource owner decides whether she wants to share the resource when and how it can be used

  9. Volkert Example: Automated Teller Machine (ATM) Authoritarian model Trust is build up on interrogation of the pin code Based on the code, the machine makes sure that the partner is eligible The partner must trust, thereon, that the machine is not manipulated, e.g., keep the card for later abuse Remark: In a Grid, it would be naive to assume that no machine participating in the communication is manipulated. => In such a system, partners have equal rights

  10. Volkert The Risks in Grid Aimed attacks on intermediate locations Large-scale distributed farms Illegal or improper data distribution and information depending on the access type Huge distributed storage capacities Break-in by exploting security leaks Complex, heterogeneous and dynamic environments Damages by viruses, worms, etc. Problem of a highly connected novel infrastructure

  11. Volkert Overview Glossary Necessity of security in data networks Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital signatures X509 certificates Grid Security Basic concepts Grid Security Infrastructure Proxy certificates Command line interfaces Virtual Organization Concept of VO and authorization VOMS, LCAS, LCMAPS C/C++ interfaces (GSS-API, GSS Assist)

  12. Volkert Cryptography Mathematical algorithms E and D which play an important role in connection with insecure infrastructures Variable symbolism (meaning) Simple text: M Encrypted text: C Encryption with key K1: E K1(M) = C Encryption with key K2: D K2(C) = M Algorithm Symmetric: K2 = K1 Asymmetric: K2 ≠ K1 K1 K2 Encryption Decryption M C M

  13. Volkert Symmetric Algorithms The same key is used to code and decode Examples: 􀂃 DES 􀂃 3DES 􀂃 Rijndael (AES) 􀂃 Blowfish 􀂃 Kerberos Paul John ciao 3$r 3$r ciao Paul John ciao 3$r 3$r ciao

  14. Volkert Simplest Method Secret key is exchanged between the two communicating partners Not allowed to be crackable Should not produce something regular Via a secure way Hand it personally (Mils Elektronik) Secure storage

  15. Volkert Key Generation via an Insecure Channel Diffie-Hellman procedure, about 1970 Information exchange using the channel Without information transport, the key reconstruction is allowed

  16. Volkert Common Secret Key Between Alice and Bob The number α is known, modulo arithmetic is used Alice dices a random number a, sends A = αa mod N Bob dices random b, sends B = αb mod N Alice computes C = Βa = αba = αab mod N Bob computes C = Ab = αab = αba mod N C is the common secret key Remark: Even when A, B, N, and α are known, C is practically not discoverable Because of the modulo arithmetic with high modulo values

  17. Volkert Modulo Computation A = αa mod N is, for big N, practically irreversible, so called one way function The determination complexity for a typical N is proportional to: exp(C log N (log log N)2)1/3 with C>1 typically: N = 10385 (a 1280-digit binary number) Even standard exponentiation would be, at this order, too much for the most modern chips: a computation would take more time than the time the universe exists Computation exploiting the dual representation Example: a = 37 = 25 + 22 + 20 α 2i is computed by repeated squaring α37 = α32 x α4 x α0 gives the value

  18. Volkert Generally: One Way Functions Function H with H(M) = h 1. For given h it is almost impossible to compute M = H-1(h) 2. For given M, it is difficult to find an M' with H(M’) = H(M) We also speak of one way hash functions, when the one way function H creates a fixed length message out of a variable length message h must be at least 128 Bits long, to insure some security Examples: SNEFRU: Hash length 128 oder 256 Bits MD4/MD5: Hash length 128 Bits SHA (Standard FIPS): Hash length 160 Bits

  19. Volkert Symmetric Keys Advantage: fast Disadvantage: How to distribute the key? The number of keys is O(n2)

  20. Volkert Deceiving Partner One of the partners sends himself messages pretending to be from others Remedy: asymmetric keys Each used has a private key D and a public key E: The personal key can not be derived from the public one A message encrypted with the public key can only be decrypted with a personal key Often: both keys function reversely

  21. Volkert Public Key Method Each user has a private and a public key Number of keys is O(n) No exchange of secret information is needed The sender encrypts with the receiver's public key; The receiver decrypts with its personal key Example: Diffie-Helmann (1977) Lower sums (Ralph Merkle, Martin E. Helman) RSA (1978) Paul John ciao 3$r 3$r ciao Paul John ciao cy7 cy7 ciao Paul keys John keys public private public private

  22. Volkert Lower Sums: Principle Given: Key E = (a1,a2,…,an) Message N Procedure Message is binary coded Decomposed in blocks of length n Blocks x = (x1,x2,…,xn) are encrypted as a scalar product E . x Example: E = (2292,1089,211,1625,1283,599,759,315,2597,2463) E x = 6790 x = ? With a suited choice of E, hardly breakable All 2n possibilities should be tried Tipically today n = 1280 Even the receiver does not manage it otherwise Solution: X = (0,0,1,1,1,0,1,1,1,0)

  23. Volkert Lower Sums: Obtaining the Key Significant part of the private key Choose random numbers such that, with increasing n, each number is bigger than the sum of all previous ones D = (d1,d2,…,dn) Example: D = (3,5,11,20,41,83,169,340,679,1358) Remark: an x coded this way can be easily decrypted! e.g., 1260 for the old x Public key Choose random numbers w and m and compute ai = di w mod m Remark: w and m remain secret, being, therefore, part of the private key

  24. Volkert Lower Sums: Essential Statements Due to modulo, almost unbreakable Example: w = 764; m = 2731; A = (2292,1089,211,1625,1283,599,759,315,2597,2463) Our old message: A x = 6790 Decryption is easy One uses w-1 with w-1 w = 1 modulo m (it exists when m and w have no common divizors,easy to compute) Example: 764-1 = 1605 mod 2731

  25. Volkert Low Sums: Decryption Compute C’ = C w-1 mod m C’ = 6790 x 1605 mod 2731 = 1260 Further it is valid that: because C = Σ ai xi C w-1 = Σ ai xi w-1 = Σ ai w-1 xi = Σ di xi mod m With the private key it is easy to decrypt

  26. Volkert RSA Basic principle: big prime factors are difficult to find Public key Choose 2 bog prime numbers p and q n = pq and another random number E make the public key Encryption Each character of the text is decimally coded (0-99) with a fixed code The code is decomposed in blocks Pi of same length, such that the resulted numbers are lower than n Encrypted text is Ci = PiE mod n

  27. Volkert RSA One takes advantage of the fact that aE mod n = aE mod φ(n) mod n with φ(n) = (p-1)(q-1) So when in addition to E, an easily determined D and E.D=1 is used, we obtain CiD = PiED = Pi mod n

  28. Volkert Overview Glossary Necessity of security in data networks Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital signatures X509 certificates Grid Security Basic concepts Grid Security Infrastructure Proxy certificates Command line interfaces Virtual Organization Concept of VO and authorization VOMS, LCAS, LCMAPS C/C++ interfaces (GSS-API, GSS Assist)

  29. Volkert Securer Partner? Third person Cleo is located inbetween Towards Alice she behaves as Bob Generates the random number c Generates a common key with Alice C’ = αac = αca Towards Bob she behaves like Alice Generate a common key with Bob C’’ = αbc = αcb Can now read and manipulate each message between Alice and Bob

  30. Volkert Remedy: Introduction of a pass and the corresponding authority The pass does not, strictly speaking, prove that to the given image the given name does belong, but the emitting authority believes this Here: Certificate from an authorizer Signatures

  31. Volkert Digital Signatures Paul computes the Hash of the message Paul encrypts with his own privateKey, obtaining the digital signature Paul sends the signed message to John John computes himself the hash of the message and verifies by comparing with has decoded using the publickey If they are the same, the message was not modified. Paul cannot repudiate it. Paul This is some message This is some message Hash(A) Digital Signature Digital Signature John This is some message Hash(B) = ? Paul keys Hash(A) Digital Signature public private

  32. Volkert Digital Certificates Paul’s digital signature is secure when: 1. Paul’s private key was indeed used 2. John knows Paul’s public key How can John be sure that he knows Paul's public key and not of someone other? A third party (a kind of authority) guarantees the conformity of the public key with the owner. Both Paul and John must trust this third party 2 Models: X.509: hierarchical organization; PGP: “web of trust”.

  33. Volkert PGP “web of trust” F knows D and E, who knows A and C, who knows A and B. F is reasonably sure that the key from A is really from A. D B F C E A

  34. Volkert X.509 The third party is a Certification Authority (CA) Emits digital certificates for principals (users, programs and machines) Verifies the identity and the personal data of the requirer Registration Authorities (RAs) execute the actual verification CAs periodically publish lists of no more valid certificates Certificate Revocation Lists (CRL): contain all the revoked and expired certificates CA certificates are self signed

  35. Volkert X.509 Certificates An X.509 certificate contains: owner’s public key identity of the owner info on the CA time of validity Serial number digital signature of the CA􀂃 Structure of a X.509 certificate Public key Subject:C=CH, O=CERN, OU=GRID, CN=Andrea Sciaba 8968 Issuer: C=CH, O=CERN, OU=GRID, CN=CERN CA Expiration date: Aug 26 08:08:14 2005 GMT Serial number: 625 (0x271) CA Digital signature

  36. Volkert GRID Security: the players Users • Large and dynamic population • Different accounts at different sites • Personal and confidential data • Heterogeneous privileges (roles) • Desire Single Sign-On “Groups” • “Group” data • Access Patterns • Membership • Heterogeneous Resources • Access Patterns • Local policies • Membership Sites Grid

  37. The Grid Security Infrastructure (GSI) John’s certificate Verify CA signature Random phrase Encrypy with J.’ s private key Encrypted phrase Decrypt with J.’ s public key Compare with original phrase John Paul Based on X.509 PKI: • every user/host/service has an X.509 certificate; • certificates are signed by trusted (by the local sites) CA’s; • every Grid transaction is mutually authenticated: • John sends his certificate; • Paul verifies signature in John’s certificate; • Paul sends to John a challenge string; • John encrypts the challenge string with his private key; • John sends encrypted challenge to Paul • Paul uses John’s public key to decrypt the challenge. • Paul compares the decrypted string with the original challenge • If they match, Paul verified John’s identity and John can not repudiate it. Volkert

  38. The Grid Security Infrastructure (GSI) John’s certificate Verify CA signature Random phrase Encrypy with J.’ s private key Encrypted phrase Decrypt with J.’ s public key Compare with original phrase John Paul Based on X.509 PKI: • every user/host/service has an X.509 certificate; • certificates are signed by trusted (by the local sites) CA’s; • every Grid transaction is mutually authenticated: • John sends his certificate; • Paul verifies signature in John’s certificate; • Paul sends to John a challenge string; • John encrypts the challenge string with his private key; • John sends encrypted challenge to Paul • Paul uses John’s public key to decrypt the challenge. • Paul compares the decrypted string with the original challenge • If they match, Paul verified John’s identity and John can not repudiate it. VERY IMPORTANT Private keysmust be stored only: in protected places AND in encrypted form Volkert

  39. Volkert Certificate request … more details Egee/LCG recognizes a given set of CAs https://lcg-registrar.cern.ch/pki_certificates.html How do you request a certificate depends on your CA For GILDA, have a look at the Demo Video: https://gilda.ct.infn.it/video/Certification/Allproxy.html (Flash) https://gilda.ct.infn.it/video/Certification/AllCertproxy.ram (Real)

  40. Volkert Certificate Request State of Illinois ID User generatespublic/privatekey pair. CA confirms identity, signs certificate and sends back to user. CertRequest Public Key Certification Authority Cert Private Key encrypted on local disk User send public key to CA along with proof of identity.

  41. Volkert Certificate Information To get cert information run grid-cert-info [scampana@grid019:~]$ grid-cert-info -subject /C=CH/O=CERN/OU=GRID/CN=Simone Campana 7461 Options for printing cert information-all -startdate-subject -enddate-issuer -help

  42. Volkert X.509 Proxy Certificate GSI extension to X.509 Identity Certificates signed by the normal end entity cert (or by another proxy). Enables single sign-on Support some important features Delegation Mutual authentication Has a limited lifetime (minimized risk of “compromised credentials”) It is created by the grid-proxy-init command: % grid-proxy-init Enter PEM pass phrase: ****** Options for grid-proxy-init: -hours <lifetime of credential> -bits <length of key> -help

  43. Volkert grid-proxy-init User enters pass phrase, which is used to decrypt private key. Private key is used to sign a proxy certificate with its own, new public/private key pair. User’s private key not exposed after proxy has been signed User certificate file User Proxy certificate file Private Key (Encrypted) Pass Phrase • Proxy placed in /tmp • the private key of the Proxy is not encrypted: • stored in local file: must be readable only by the owner; • proxy lifetime is short (typically 12 h) to minimize security risks. • NOTE: No network traffic!

  44. Volkert Proxy again … grid-proxy-init ≡ “login to the Grid” To “logout” you have to destroy your proxy: grid-proxy-destroy This does NOT destroy any proxies that were delegated from this proxy. You cannot revoke a remote proxy Usually create proxies with short lifetimes To gather information about your proxy: grid-proxy-info Options for printing proxy information-subject -issuer-type -timeleft-strength -help

  45. Volkert Delegation and limited proxy Delegation = remote creation of a (second level) proxy credential New key pair generated remotely on server Client signs proxy cert and returns it Allows remote process to authenticate on behalf of the user Remote process “impersonates” the user The client can elect to delegate a “limited proxy” Each service decides whether it will allow authentication with a limited proxy Job manager service requires a full proxy GridFTP server allows either full or limited proxy to be used

  46. Volkert Long term proxy Proxy has limited lifetime (default is 12 h) Bad idea to have longer proxy However, a grid task might need to use a proxy for a much longer time Grid jobs in HEP Data Challenges on LCG last up to 2 days myproxy server: Allows to create and store a long term proxy certificate: myproxy-init -s <host_name> -s: <host_name> specifies the hostname of the myproxy server myproxy-info Get information about stored long living proxy myproxy-get-delegation Get a new proxy from the MyProxy server myproxy-destroy Chech out the myproxy-xxx - - help option A dedicated service on the RB can renew automatically the proxy contacts the myproxy server

  47. Volkert GSI environment variables User certificate files: Certificate: X509_USER_CERT (default: $HOME/.globus/usercert.pem) Private key: X509_USER_KEY (default: $HOME/.globus/userkey.pem) Proxy: X509_USER_PROXY (default: /tmp/x509up_u<id>) Host certificate files: Certificate: X509_USER_CERT (default: /etc/grid-security/hostcert.pem) Private key: X509_USER_KEY (default: /etc/grid-security/hostkey.pem) Trusted certification authority certificates: X509_CERT_DIR (default: /etc/grid-security/certificates)

  48. Volkert Overview Glossary Encryption Symmetric algorithms Asymmetric algorithms: PKI Certificates Digital Signatures X509 certificates Grid Security Basic concepts Grid Security Infrastructure Proxy certificates Command line interfaces Virtual Organisation Concept of VO and authorization VOMS, LCAS, LCMAPS C/C++ interfaces (GSS-API, GSS Assist)

  49. Volkert Virtual Organizations and authorization Grid users MUST belong to Virtual Organizations What we previously called “Groups” Sets of users belonging to a collaboration List of supported VOs: https://lcg-registrar.cern.ch/virtual_organization.html VOs maintain a list of their members The list is downloaded by Grid machines to map user certificate subjects to local “pool” accounts Sites decide which VOs to accept ... "/C=CH/O=CERN/OU=GRID/CN=Simone Campana 7461" .dteam "/C=CH/O=CERN/OU=GRID/CN=Andrea Sciaba 8968" .cms "/C=CH/O=CERN/OU=GRID/CN=Patricia Mendez Lorenzo-ALICE" .alice ... /etc/grid-security/grid-mapfile

  50. Volkert On the side: user Registration in a VO Import your certificate in your browser If you received a .pem certificate you need to convert it to PKCS12 Use openssl command line (available in each egee/LCG UI) openssl pkcs12 –export –in usercert.pem –inkey userkey.pem –out my_cert.p12 –name ’My Name’ Sign the usage guidelines for the VO You will be registered in the VO-LDAP server (wait for notification) Gilda (and other VO): You receive already a PKCS12 certificate (can import it directly into web browser) For future use, you will need usercert.pem and userkey.pem in a directory ~/.globus on your UI Export the PKCS12 cert to a local dir on UI and use again openssl: openssl pkcs12 -nocerts -in my_cert.p12 -out userkey.pem openssl pkcs12 -clcerts -nokeys -in my_cert.p12 -out usercert.pem

More Related