VOMS

Module for dealing with VOMS (Virtual Organization Membership Service)

class DIRAC.Core.Security.VOMS.VOMS(*args, **kwargs)

Bases: object

__init__(*args, **kwargs)

Create VOMS class, setting specific timeout for VOMS shell commands.

getVOMSAttributes(proxy, switch='all')

Return VOMS proxy attributes as list elements if switch=”all” (default) OR return the string prepared to be stored in DB if switch=”db” OR return the string of elements to be used as the option string in voms-proxy-init if switch=”option”. If a given proxy is a grid proxy, then function will return an empty list.

getVOMSESLocation()
getVOMSProxyFQAN(proxy)

Get the VOMS proxy fqan attributes

getVOMSProxyInfo(proxy, option=False)
Returns information about a proxy certificate (both grid and voms).

Available information is:

  1. Full (grid)voms-proxy-info output

  2. Proxy Certificate Timeleft in seconds (the output is an int)

  3. DN

  4. voms group (if any)

Parameters:
  • proxy (str) – the proxy certificate location.

  • option (str) –

    None is the default value. Other option available are:

    • timeleft

    • actimeleft

    • identity

    • fqan

    • all

Return type:

tuple

Returns:

status, output, error, pyerror.

setVOMSAttributes(proxy, attribute=None, vo=None)

Sets voms attributes to a proxy

vomsInfoAvailable()

Is voms info available?

DIRAC.Core.Security.VOMS.voms_init_cmd(vo: str, attribute: str | None, chain: X509Chain, in_fn: str, out_fn: str, vomsesPath: str | None) list[str]