ESF Manager Results Cache Facility. More...
Go to the source code of this file.
Enumerations | |
| enum | SafCacheResult { SafCACHE_FOUND = 0, SafCACHE_NOTFOUND = 1, SafCACHE_EXPIRED = 2, SafCACHE_NOTCACHED = 3, SafCACHE_CANTCACHE = 4, SafCACHE_INVALID = 5, SafCACHE_BADCALL = 10, SafCACHE_INTERNAL = 20, SafCACHE_RESOURCE = 21, SafCACHE_NOTINIT = 22, SafCACHE_SHUTDOWN = 23, SafCACHE_TIMEOUT = 24, SafCACHE_R_Invalid, SafCACHE_R_Sizer = (1<<30) } |
ESF Cache Query Result. More... | |
| enum | SafCacheType { SafCACHE_NONE = 0, SafCACHE_VERIFY = 1, SafCACHE_AUTH = 2, SafCACHE_XAUTH = 3, SafCACHE_T_Invalid, SafCACHE_T_Sizer = (1<<30) } |
ESF Cache Identifier. More... | |
Functions | |
| mf_uns32 | SafCacheInit (struct SafInit *Init) |
| ESF Cache Initialization. | |
| SafRet | SafCacheTerminate (mf_uns32 What, void *Reserved) |
| ESF Cache Termination. | |
| enum SafCacheResult | SafCacheQuery (struct safpb_parameter_block *Request) |
| Query Cache. | |
| enum SafCacheResult | SafCacheStore (struct safpb_parameter_block *Request) |
| Cache a result. | |
| SafRet | SafCacheUpdate (struct safpb_parameter_block *Request) |
| Remove cache entries after security data is updated. | |
ESF Manager Results Cache Facility.
Data structures and other definitions for the ESF Manager Cache.
| enum SafCacheResult |
ESF Cache Query Result.
The result of a cache query. Note that 0 indicates a hit; any other value is an explanation for a miss. In cases where an entry was found but was deemed unusable (eg CACHE_EXPIRED or CACHE_INVALID), the cache will still return the data, but the caller should consider it non-authoritive.
| enum SafCacheType |
| mf_uns32 SafCacheInit | ( | struct SafInit * | Init | ) |
ESF Cache Initialization.
This function is invoked by the ESF Manager Initialization routine to initialize the cache facility.
References SafInit::Config, SafCACHE_FOUND, SafDupStr(), SafINIT_OK, SafINIT_RESRCE, SafLog(), SafMsgERR, SafMsgINFO, SafMsgWARN, SafQueryCfg(), SafR_OK, and SafSTRCMP_CI.
Referenced by safmgr().
| SafRet SafCacheTerminate | ( | mf_uns32 | What, | |
| void * | Reserved | |||
| ) |
ESF Cache Termination.
Terminate caching. After this point no caching will be done unless ESF is re-initialized.
References SafCACHE_SHUTDOWN, SafR_INTERNAL, SafR_OK, SafTERM_ESF, and SafTERM_PROCESS.
Referenced by safterm().
| enum SafCacheResult SafCacheQuery | ( | struct safpb_parameter_block * | Request | ) |
Query Cache.
Check the cache to see if this particular request has already been processed.
References safpb_parameter_block::DISCRETE, safpb_parameter_block::RETCODES, SafCACHE_CANTCACHE, SafCACHE_FOUND, and SafCACHE_NOTFOUND.
Referenced by SafAuth(), SafVerify(), and SafXauth().
| enum SafCacheResult SafCacheStore | ( | struct safpb_parameter_block * | Request | ) |
Cache a result.
Cache an ESF request and its result. Assumes the caller has already decided that this result should be cached, but in some cases we may reject the request anyway.
TODO: We may need an ESF configuration option that disables passtokens because I bet CAS and MFDS routinely request tickets, which will prevent caching any Verify operations. Customers who don't use passtokens, or would prefer to have Verify caching over passtokens, will want to disable that.
References safpb_parameter_block::DISCRETE, safpb_parameter_block::REQUESTS, safpb_parameter_block::RETCODES, saf78_SAF_RC_NOT_COMPLETE, saf78_SAF_RC_SUCCESS, saf78_TYPE_ATTR_STATUS_ACC, saf78_TYPE_ENVIR_CREATE, saf78_TYPE_USER_CHECK, SafCACHE_AUTH, SafCACHE_BADCALL, SafCACHE_CANTCACHE, SafCACHE_FOUND, SafCACHE_NOTCACHED, SafCACHE_NOTFOUND, SafCACHE_VERIFY, SafCACHE_XAUTH, safpb_parameter_block::safpb_type, safpb_verify::safpb_verify_NEWPWRD_len, safpb_verify::safpb_verify_TOKEN_ptr, and safpb_parameter_block::VERIFY.
Referenced by SafAuth(), SafVerify(), and SafXauth().
| SafRet SafCacheUpdate | ( | struct safpb_parameter_block * | Request | ) |
Remove cache entries after security data is updated.
Remove some or all cache entries in response to an administrative update request. The Request parameter may point to an ESF request, in which case matching entries should be removed; or it may be null, which flushes the entire cache.
References SafCACHE_NOTFOUND, and SafR_OK.
Referenced by SafUpdate().