{"id":41591470,"url":"https://github.com/opensciencegrid/osg-ca-generator","last_synced_at":"2026-01-24T09:31:42.229Z","repository":{"id":46184165,"uuid":"54154946","full_name":"opensciencegrid/osg-ca-generator","owner":"opensciencegrid","description":"Library for generating CAs and host certs for testing","archived":false,"fork":false,"pushed_at":"2025-09-12T21:36:16.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":7,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-09-12T23:46:08.119Z","etag":null,"topics":["software","tests"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensciencegrid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-17T22:13:42.000Z","updated_at":"2025-09-12T21:36:20.000Z","dependencies_parsed_at":"2022-09-11T16:41:15.547Z","dependency_job_id":null,"html_url":"https://github.com/opensciencegrid/osg-ca-generator","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/opensciencegrid/osg-ca-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fosg-ca-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fosg-ca-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fosg-ca-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fosg-ca-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensciencegrid","download_url":"https://codeload.github.com/opensciencegrid/osg-ca-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensciencegrid%2Fosg-ca-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28723233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["software","tests"],"created_at":"2026-01-24T09:31:41.441Z","updated_at":"2026-01-24T09:31:42.223Z","avatar_url":"https://github.com/opensciencegrid.png","language":"Python","readme":"osg-ca-generator\n===============\n\nA CLI utility and python library for quick creation of dummy, DigiCert-like or\nCILogon-like CAs and certificates for the purpose of osg-testing.\n\nCommand-Line Interface\n----------------------\n\n```\nUsage: osg-ca-generator [options]\n\nGenerate or load pre-existing DigiCert-like CAs for testing OSG software.\n\nOptions:\n  --version             show program's version number and exit\n  -h, --help            show this help message and exit\n  -e DAYS, --expire-days=DAYS\n                        The number of days before test CAs or certificates\n                        expire\n  -f, --force           Overwrite any existing CAs or certificates\n  --host                Create a host certificate using the test CA\n  -u USERNAME, --user=USERNAME\n                        Create a user certificate for the specified user using\n                        the test CA\n  -p PASSWORD, --pass=PASSWORD\n                        Set the user certificate's password\n  -v VO, --voms=VO      Create files for Virtual Organization, VO\n```\n\nExample Usage\n--------------\n\nCreate a dummy OSG CA:\n\n```\nosg-ca-generator\n```\n\nCreate an OSG host cert, creating a new CA if necessary, otherwise using a pre-existing one:\n\n```\nosg-ca-generator --host\n```\n\nCreate VOMS support files for the `VOTEST` virtual organization:\n\n```\nosg-ca-generator --voms VOTEST\n```\n\nCreate an OSG user cert for the user `foo` with the password `password`, creating a new CA if necessary, otherwise using a pre-existing one:\n\n```\nosg-ca-generator --user=foo --pass=password\n```\n\nPython Library\n--------------\n\n```\nNAME\n    cagen - Create CILogon-like OSG test CAs and certificates\n\nFILE\n    /usr/lib/python2.7/site-packages/cagen.py\n\nCLASSES\n    __builtin__.object\n        CA\n    exceptions.Exception(exceptions.BaseException)\n        CertException\n    \n    class CA(__builtin__.object)\n     |  CILogon-like certificate authorities (CAs) that can be used to generate\n     |  host or user certificates.\n     |  \n     |  Pre-existing CAs can be loaded via the subject name and __init__()\n     |  (without the force option) or by its path with load().\n     |  \n     |  Methods defined here:\n     |  \n     |  __init__(self, subject, days=10, force=False)\n     |      Create a CA (and crl) with the given subject.\n     |      \n     |      days - specifies the number of days before the certificate expires\n     |      force - will overwrite any existing certs and keys if set to True\n     |  \n     |  crl(self, days=None)\n     |      Create CRL file for the CA instance\n     |      \n     |      days - specifies the number of days before the certificate expires\n     |  \n     |  hostcert(self, days=None)\n     |      Creates a host certificate (hostcert.pem) and host key (hostkey.pem)\n     |      in /etc/grid-security from the given CA instance.\n     |      \n     |      days - specifies the number of days before the certificate expires\n     |      \n     |      Returns strings:\n     |      Host certificate subject, host certificate path, host certificate key path\n     |  \n     |  usercert(self, username, password, days=None)\n     |      Creates a user cert (usercert.pem) and user key (userkey.pem)\n     |      in ~username/.globus/ from the given CA instance.\n     |      \n     |      days - specifies the number of days before the certificate expires\n     |      \n     |      Returns strings:\n     |      User certificate subject, user certificate path, user certificate key path\n     |  \n     |  voms(self, vo_name)\n     |      Create VOMS LSC files and entry in /etc/vomses\n     |      \n     |      vo_name - name of Virtual Organization (alpha-numeric characters only)\n     |  \n     |  ----------------------------------------------------------------------\n     |  Class methods defined here:\n     |  \n     |  load(cls, ca_path) from __builtin__.type\n     |      Load a CA from the location given by ca_path\n     |  \n     |  ----------------------------------------------------------------------\n     |  Data descriptors defined here:\n     |  \n     |  __dict__\n     |      dictionary for instance variables (if defined)\n     |  \n     |  __weakref__\n     |      list of weak references to the object (if defined)\n    \n    class CertException(exceptions.Exception)\n     |  Exception class for certificate errors\n     |  \n     |  Method resolution order:\n     |      CertException\n     |      exceptions.Exception\n     |      exceptions.BaseException\n     |      __builtin__.object\n     |  \n     |  Data descriptors defined here:\n     |  \n     |  __weakref__\n     |      list of weak references to the object (if defined)\n     |  \n     |  ----------------------------------------------------------------------\n     |  Methods inherited from exceptions.Exception:\n     |  \n     |  __init__(...)\n     |      x.__init__(...) initializes x; see help(type(x)) for signature\n     |  \n     |  ----------------------------------------------------------------------\n     |  Data and other attributes inherited from exceptions.Exception:\n     |  \n     |  __new__ = \u003cbuilt-in method __new__ of type object\u003e\n     |      T.__new__(S, ...) -\u003e a new object with type S, a subtype of T\n     |  \n     |  ----------------------------------------------------------------------\n     |  Methods inherited from exceptions.BaseException:\n     |  \n     |  __delattr__(...)\n     |      x.__delattr__('name') \u003c==\u003e del x.name\n     |  \n     |  __getattribute__(...)\n     |      x.__getattribute__('name') \u003c==\u003e x.name\n     |  \n     |  __getitem__(...)\n     |      x.__getitem__(y) \u003c==\u003e x[y]\n     |  \n     |  __getslice__(...)\n     |      x.__getslice__(i, j) \u003c==\u003e x[i:j]\n     |      \n     |      Use of negative indices is not supported.\n     |  \n     |  __reduce__(...)\n     |  \n     |  __repr__(...)\n     |      x.__repr__() \u003c==\u003e repr(x)\n     |  \n     |  __setattr__(...)\n     |      x.__setattr__('name', value) \u003c==\u003e x.name = value\n     |  \n     |  __setstate__(...)\n     |  \n     |  __str__(...)\n     |      x.__str__() \u003c==\u003e str(x)\n     |  \n     |  __unicode__(...)\n     |  \n     |  ----------------------------------------------------------------------\n     |  Data descriptors inherited from exceptions.BaseException:\n     |  \n     |  __dict__\n     |  \n     |  args\n     |  \n     |  message\n\nFUNCTIONS\n    certificate_info(path)\n        Extracts and returns the subject and issuer from an X.509 certificate.\n\nDATA\n    PIPE = -1\n```\n\nDevelopment\n-----------\n\nAfter merging changes into the `master` branch, update the submodule in\n[osg-test](https://github.com/opensciencegrid/osg-test):\n\n```\ngit clone --recursive git@github.com:opensciencegrid/osg-test.git\ncd osg-test/osg-ca-generator\ngit pull\ncd ..\ngit add osg-ca-generator\ngit commit -m 'Update the osg-ca-generator submodule'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensciencegrid%2Fosg-ca-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensciencegrid%2Fosg-ca-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensciencegrid%2Fosg-ca-generator/lists"}