arpoc.plugins package

Submodules

arpoc.plugins.env_attr_time module

class arpoc.plugins.env_attr_time.EnvAttrDateTime[source]

Bases: arpoc.plugins._lib.EnvironmentAttribute

Returns the current time (UTC) in YYYY-MM-DD HH:MM:SS format

Attribute key: datetime

static run() → Any[source]
target = 'datetime'
class arpoc.plugins.env_attr_time.EnvAttrTime[source]

Bases: arpoc.plugins._lib.EnvironmentAttribute

Returns the current time (UTC) in HH:MM:SS format

Attribute key: time

static run() → Any[source]
target = 'time'
class arpoc.plugins.env_attr_time.EnvAttrTimeHour[source]

Bases: arpoc.plugins._lib.EnvironmentAttribute

Returns the current hours of the clock (UTC)

Attribute key: time_hour

static run() → Any[source]
target = 'time_hour'
class arpoc.plugins.env_attr_time.EnvAttrTimeMinute[source]

Bases: arpoc.plugins._lib.EnvironmentAttribute

Returns the current minute of the clock (UTC)

Attribute key: time_minute

static run() → Any[source]
target = 'time_minute'
class arpoc.plugins.env_attr_time.EnvAttrTimeSecond[source]

Bases: arpoc.plugins._lib.EnvironmentAttribute

Returns the current second of the clock (UTC)

Attribute key: time_second

static run() → Any[source]
target = 'time_second'

arpoc.plugins.obj_json module

class arpoc.plugins.obj_json.ObjJson(cfg: Dict)[source]

Bases: arpoc.plugins._lib.ObjectSetter

Calls a url, parses the json it gets and returns the dictionary Uses the existing object data as http request parameter.

Attribute key: jsonsetter

Configuration:
  • url: the url to be called, mandatory

name = 'jsonsetter'
run(data: Dict) → Any[source]

arpoc.plugins.obj_urlmap module

class arpoc.plugins.obj_urlmap.ObjUrlmap(cfg: Dict)[source]

Bases: arpoc.plugins._lib.ObjectSetter

Maps a path based on the regex supplied in the configuration

Attribute key: urlmap

Configuration:
  • mappings: List of python regexes. The regex groups names are used for the data.

name = 'urlmap'
run(data: Dict) → Any[source]

arpoc.plugins.obl_loggers module

class arpoc.plugins.obl_loggers.Log[source]

Bases: arpoc.plugins._lib.Obligation

Log the access request.

Name: obl_log

Configuration:
  • loggercfg – the logger cfg of the python logging module

  • formatstring – A format string for the message generation

    default: {} subject.email accessed object.service [object.path] – object.target_url

The log will be created with INFO level

name = 'obl_log'
static replace_accessattr(logtext, access_info)[source]
static replace_attr(logtext, context)[source]
static replace_envattr(logtext, env_info)[source]
static replace_objectattr(logtext, object_info)[source]
static replace_subjectattr(logtext, subject_info)[source]
static run(effect: Optional[arpoc.ac.common.Effects], context: Dict, cfg: Dict) → bool[source]
class arpoc.plugins.obl_loggers.LogFailed[source]

Bases: arpoc.plugins._lib.Obligation

Log failed access requests.

Name: obl_log_failed

Configuration: Same as obl_log

name = 'obl_log_failed'
static run(effect: Optional[arpoc.ac.common.Effects], context: Dict, cfg: Dict) → bool[source]
class arpoc.plugins.obl_loggers.LogSuccessful[source]

Bases: arpoc.plugins._lib.Obligation

Log successful access requests.

Name: obl_log_successful

Configuration: Same as obl_log

name = 'obl_log_successful'
static run(effect: Optional[arpoc.ac.common.Effects], context: Dict, cfg: Dict) → bool[source]

Module contents