xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Macaroons::Authz Class Referencefinal

#include <XrdMacaroonsAuthz.hh>

Inheritance diagram for Macaroons::Authz:
Inheritance graph
[legend]
Collaboration diagram for Macaroons::Authz:
Collaboration graph
[legend]

Public Member Functions

 Authz (XrdSysLogger *lp, const char *parms, XrdAccAuthorize *chain)
 
virtual ~Authz ()
 
virtual XrdAccPrivs Access (const XrdSecEntity *Entity, const char *path, const Access_Operation oper, XrdOucEnv *env) override
 
virtual bool Validate (const char *token, std::string &emsg, long long *expT, XrdSecEntity *entP) override
 
virtual int Audit (const int accok, const XrdSecEntity *Entity, const char *path, const Access_Operation oper, XrdOucEnv *Env) override
 
virtual int Test (const XrdAccPrivs priv, const Access_Operation oper) override
 
virtual Issuers IssuerList () override
 
- Public Member Functions inherited from XrdAccAuthorize
 XrdAccAuthorize ()
 Constructor.
 
virtual ~XrdAccAuthorize ()
 Destructor.
 
- Public Member Functions inherited from XrdSciTokensHelper
 XrdSciTokensHelper ()
 Constructor and Destructor.
 
virtual ~XrdSciTokensHelper ()
 

Private Member Functions

XrdAccPrivs OnMissing (const XrdSecEntity *Entity, const char *path, const Access_Operation oper, XrdOucEnv *env)
 

Private Attributes

ssize_t m_max_duration
 
XrdAccAuthorizem_chain
 
XrdSysError m_log
 
std::string m_secret
 
std::string m_location
 
int m_authz_behavior
 

Additional Inherited Members

- Public Types inherited from XrdSciTokensHelper
typedef std::vector< ValidIssuerIssuers
 

Constructor & Destructor Documentation

◆ Authz()

Macaroons::Authz::Authz ( XrdSysLogger lp,
const char *  parms,
XrdAccAuthorize chain 
)

◆ ~Authz()

virtual Macaroons::Authz::~Authz ( )
inlinevirtual

Member Function Documentation

◆ Access()

virtual XrdAccPrivs Macaroons::Authz::Access ( const XrdSecEntity Entity,
const char *  path,
const Access_Operation  oper,
XrdOucEnv Env 
)
overridevirtual

Check whether or not the client is permitted specified access to a path.

Parameters
Entity-> Authentication information
path-> The logical path which is the target of oper
oper-> The operation being attempted (see the enum above). If the oper is AOP_Any, then the actual privileges are returned and the caller may make subsequent tests using Test().
Env-> Environmental information at the time of the operation as supplied by the path CGI string. This is optional and the pointer may be zero.
Returns
Permit: a non-zero value (access is permitted) Deny: zero (access is denied)

Implements XrdAccAuthorize.

◆ Audit()

virtual int Macaroons::Authz::Audit ( const int  accok,
const XrdSecEntity Entity,
const char *  path,
const Access_Operation  oper,
XrdOucEnv Env 
)
inlineoverridevirtual

Route an audit message to the appropriate audit exit routine. See XrdAccAudit.h for more information on how the default implementation works. Currently, this method is not called by the ofs but should be used by the implementation to record denials or grants, as warranted.

Parameters
accok-> True is access was grated; false otherwise.
Entity-> Authentication information
path-> The logical path which is the target of oper
oper-> The operation being attempted (see above)
Env-> Environmental information at the time of the operation as supplied by the path CGI string. This is optional and the pointer may be zero.
Returns
Success: !0 information recorded. Failure: 0 information could not be recorded.

Implements XrdAccAuthorize.

◆ IssuerList()

virtual Issuers Macaroons::Authz::IssuerList ( )
inlineoverridevirtual

Implements XrdSciTokensHelper.

◆ OnMissing()

XrdAccPrivs Macaroons::Authz::OnMissing ( const XrdSecEntity Entity,
const char *  path,
const Access_Operation  oper,
XrdOucEnv env 
)
private

◆ Test()

virtual int Macaroons::Authz::Test ( const XrdAccPrivs  priv,
const Access_Operation  oper 
)
inlineoverridevirtual

Check whether the specified operation is permitted.

Parameters
priv-> the privileges as returned by Access().
oper-> The operation being attempted (see above)
Returns
Permit: a non-zero value (access is permitted) Deny: zero (access is denied)

Implements XrdAccAuthorize.

◆ Validate()

virtual bool Macaroons::Authz::Validate ( const char *  token,
std::string &  emsg,
long long *  expT,
XrdSecEntity entP 
)
overridevirtual

Validate a scitoken.

Parameters
token- Pointer to the token to validate.
emsg- Reference to a string to hold the reason for rejection
expT- Pointer to where the expiry value is to be placed. If nill, the value is not returned.
entP- Pointer to the SecEntity object and when not nil requests that it be filled with any identifying information in the token. The caller assumes that all supplied fields may be released by calling free().
Returns
Return true if the token is valid; false otherwise with emsg set.

Implements XrdSciTokensHelper.

Member Data Documentation

◆ m_authz_behavior

int Macaroons::Authz::m_authz_behavior
private

◆ m_chain

XrdAccAuthorize* Macaroons::Authz::m_chain
private

◆ m_location

std::string Macaroons::Authz::m_location
private

◆ m_log

XrdSysError Macaroons::Authz::m_log
private

◆ m_max_duration

ssize_t Macaroons::Authz::m_max_duration
private

◆ m_secret

std::string Macaroons::Authz::m_secret
private

The documentation for this class was generated from the following file: