GLOBUSGSSASSISTFREEDNARRAY(3)
π
globus_gss_assist_gridmap β the globus_gss...ist_gridmap(3) manual, Library Functions Manual energy β¨
okay bestie, sit down, hydrate, because we're about to get into Gridmap Authorization and it's actually so good.
β¨ NAME β¨
globus_gss_assist_gridmap β Gridmap Authorization
- Gridmap Authorization and Local User Mapping. π
π SYNOPSIS π
π§ Macros
#define GlobusGssAssistFreeDNArray(dn_a)
Free array of distinguished names. (yes she's a macro, she's iconic, we love her)
π Functions
int globus_gss_assist_gridmap (char *globusidp, char **useridp)
Look up the default mapping for a Grid identity in a gridmap file.
int globus_gss_assist_userok (char *globusid, char *userid)
Gridmap entry existence check.
int globus_gss_assist_map_local_user (char *local_user, char **globusidp)
Look up the default Grid identity associated with a local user name.
globus_result_t globus_gss_assist_lookup_all_globusid (char *username,
char **dns[], int *dn_count)
Look up all Grid IDs associated with a local user ID.
globus_result_t globus_gss_assist_map_and_authorize (gss_ctx_id_t
context, char *service, char *desired_identity, char
*identity_buffer, unsigned int identity_buffer_length)
Authorize the peer of a security context to use a service.
globus_result_t globus_gss_assist_map_and_authorize_sharing (char
*shared_user_certificate, gss_ctx_id_t context, char
*desired_identity, char *identity_buffer, unsigned int
identity_buffer_length)
Authorize a particular credential for shared access.
π Detailed Description π
Gridmap Authorization and Local User Mapping.
So the functions in this group are the ones that authorize a GSSAPI credential to perform some action on the local machine. And like, not only do they check whether a credential is authorized, they can also map it to a local user name. two-for-one, we love a multitasker fr fr. π
π Macro Definition Documentation π
πΈ #define GlobusGssAssistFreeDNArray( dn_a)
Free array of distinguished names. She frees the contents of a name array that got created during a successful call to globus_gss_assist_lookup_all_globusid().
Parameters
dn_aβ Array of names to free.
Return values
void
β Function Documentation β
π¦ int globus_gss_assist_gridmap (char * globusidp, char ** useridp)
Look up the default mapping for a Grid identity in a gridmap file. The globus_gss_assist_gridmap() function parses the default gridmap file and modifies its useridp parameter to point to a copy of the string containing the default local identity that the grid identity is mapped to. If it works, the caller is responsible for freeing the string pointed to by useridp. don't forget, bestie, that's on you. π«Ά
By default, globus_gss_assist_gridmap() looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that's not set, it falls back to $HOME/.gridmap. (she's got a backup plan, we respect it)
Parameters
globusidpβ The GSSAPI name string of the identity who requested authorizationuseridpβ A pointer to a string to be set to the default user ID for the local system. No validation is done to check that such a user exists.
Returns
On success, globus_gss_assist_gridmap() returns 0 and modifies the the string pointed to by the useridp parameter. If an error occurs, a non-zero value is returned and the value pointed to by useridp is undefined. π
Return values
GLOBUS_SUCCESSβ Success1β Error
π§ globus_result_t globus_gss_assist_lookup_all_globusid (char * username, char ** dns[], int * dn_count)
Look up all Grid IDs associated with a local user ID. The globus_gss_assist_lookup_all_globusid() function parses a gridmap file and finds all the Grid IDs that map to a local user ID. The dns parameter is modified to point to an array of Grid ID strings from the gridmap file, and the dn_count parameter is modified to point to the number of Grid ID strings in the array. The caller is responsible for freeing the array using the macro GlobusGssAssistFreeDNArray(). yes, that macro from earlier. she's back. π
By default, globus_gss_assist_lookup_all_globusid() looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that's not set, it falls back to $HOME/.gridmap.
Parameters
usernameβ The local username to look up in the gridmap file.dnsβ A pointer to an array of strings. This function modifies this to point to a newly allocated array of strings. The caller must use the macroGlobusGssAssistFreeDNArray()to free this memory.dn_countβ A pointer to an integer that is modified to contain the number of entries in the array returned via thednsparameter.
Returns
On success, globus_gss_assist_lookup_all_globusid() returns GLOBUS_SUCCESS and modifies its dns and dn_count parameters as described above. If an error occurs, globus_gss_assist_lookup_all_globusid() returns a globus_result_t that can be resolved to an error object and the values pointed to by dns and dn_count are undefined.
Return values
GLOBUS_SUCCESSβ SuccessGLOBUS_GSI_GSS_ASSIST_ERROR_WITH_ARGUMENTSβ Error with argumentsGLOBUS_GSI_GSS_ASSIST_ERROR_WITH_GRIDMAPβ Invalid path to gridmapGLOBUS_GSI_GSS_ASSIST_ERROR_ERRNOβ System error
π₯ globus_result_t globus_gss_assist_map_and_authorize (gss_ctx_id_t context, char * service, char * desired_identity, char * identity_buffer, unsigned int identity_buffer_length)
Authorize the peer of a security context to use a service. The globus_gss_assist_map_and_authorize() function attempts to authorize the peer of a security context to use a particular service. If the desired_identity parameter is non-NULL, the authorization will succeed only if the peer is authorized for that identity. Otherwise, any valid authorized local user name will be used. If authorized, the local user name will be copied to the string pointed to by the identity_buffer parameter, which must be at least as long as the value passed as the identity_buffer_length parameter.
If authorization callouts are defined in the callout configuration file, globus_gss_assist_map_and_authorize() will invoke both the GLOBUS_GENERIC_MAPPING_TYPE callout and the GLOBUS_GENERIC_AUTHZ_TYPE callout; otherwise the default gridmap file will be used for mapping and no service-specific authorization will be done.
If globus_gss_assist_map_and_authorize() uses a gridmap file, it first looks for a file defined by the value of the GRIDMAP environment variable. If that's not set, it falls back to $HOME/.gridmap.
Parameters
contextβ Security context to inspect for peer identity information.serviceβ ANULL-terminated string containing the name of the service that an authorization decision is being made for.desired_identityβ Optional. If non-NULL, perform an authorization to act as the local user named by thisNULL-terminated string.identity_bufferβ A pointer to a string buffer into which will be copied the local user name that the peer of the context is authorized to act as.identity_buffer_lengthβ Length of theidentity_bufferarray.
Returns
On success, globus_gss_assist_map_and_authorize() returns GLOBUS_SUCCESS and copies the authorized local identity to the identity_buffer parameter. If an error occurs, globus_gss_assist_map_and_authorize() returns a globus_result_t that can be resolved to an error object.
Return values
GLOBUS_SUCCESSβ SuccessGLOBUS_GSI_GSS_ASSIST_ERROR_WITH_CALLOUT_CONFIGβ Invalid authorization configuration fileGLOBUS_CALLOUT_ERROR_WITH_HASHTABLEβ Hash table operation failed.GLOBUS_CALLOUT_ERROR_CALLOUT_ERRORβ The callout itself returned a error.GLOBUS_CALLOUT_ERROR_WITH_DLβ Dynamic library operation failed.GLOBUS_CALLOUT_ERROR_OUT_OF_MEMORYβ Out of memoryGLOBUS_GSI_GSS_ASSIST_GSSAPI_ERRORβ A GSSAPI function returned an errorGLOBUS_GSI_GSS_ASSIST_GRIDMAP_LOOKUP_FAILEDβ Gridmap lookup failureGLOBUS_GSI_GSS_ASSIST_BUFFER_TOO_SMALLβ Caller provided insufficient buffer space for local identity
π«Ά globus_result_t globus_gss_assist_map_and_authorize_sharing (char * shared_user_certificate, gss_ctx_id_t context, char * desired_identity, char * identity_buffer, unsigned int identity_buffer_length)
Authorize a particular credential for shared access. The globus_gss_assist_map_and_authorize_sharing() function attempts to authorize a particular credential for shared access. the desired_identity parameter is non-NULL, the authorization will succeed only if the credential is authorized for that identity. Otherwise, any valid authorized local user name will be used. If authorized, the local user name will be copied to the string pointed to by the identity_buffer parameter, which must be at least as long as the value passed as the identity_buffer_length parameter.
If authorization callouts are defined in the callout configuration file, globus_gss_assist_map_and_authorize_sharing() will invoke both the GLOBUS_GENERIC_MAPPING_TYPE callout and the GLOBUS_GENERIC_AUTHZ_TYPE callout; otherwise the default gridmap file will be used for mapping and no service-specific authorization will be done.
If globus_gss_assist_map_and_authorize_sharing() uses a gridmap file, it first looks for a file defined by the value of the GRIDMAP environment variable. If that's not set, it falls back to $HOME/.gridmap.
Parameters
shared_user_certificateβ cert and cert chain of user that owns the resources to be shared, in PEM format. This will be parsed to find the identity that should be mapped.contextβ Security context of the underlying connection. This should generally be ignored.desired_identityβ Optional. If non-NULL, perform an authorization to act as the local user named by thisNULL-terminated string.identity_bufferβ A pointer to a string buffer into which will be copied the local user name that the peer of the context is authorized to act as.identity_buffer_lengthβ Length of theidentity_bufferarray.
Returns
On success, globus_gss_assist_map_and_authorize_sharing() returns GLOBUS_SUCCESS and copies the authorized local identity to the identity_buffer parameter. If an error occurs, globus_gss_assist_map_and_authorize_sharing() returns a globus_result_t that can be resolved to an error object.
Return values π
GLOBUS_SUCCESSβ slay, it worked β¨GLOBUS_GSI_GSS_ASSIST_ERROR_WITH_CALLOUT_CONFIGβ the authorization configuration file is invalid, bestie πGLOBUS_CALLOUT_ERROR_WITH_HASHTABLEβ a hash table operation flopped πGLOBUS_CALLOUT_ERROR_CALLOUT_ERRORβ the callout itself came back with an error, no cap πGLOBUS_CALLOUT_ERROR_WITH_DLβ a dynamic library operation said no βGLOBUS_CALLOUT_ERROR_OUT_OF_MEMORYβ out of memory, we're so done π΅GLOBUS_GSI_GSS_ASSIST_GSSAPI_ERRORβ a GSSAPI function returned an error, rude πGLOBUS_GSI_GSS_ASSIST_GRIDMAP_LOOKUP_FAILEDβ gridmap lookup failure πΊοΈGLOBUS_GSI_GSS_ASSIST_BUFFER_TOO_SMALLβ the caller gave insufficient buffer space for the local identity, like not enough room for the fit π€
int globus_gss_assist_map_local_user (char * local_user, char ** globusidp) π¦
Okay so this one is the reverse direction of the vibe: it looks up the default Grid identity that goes with a local user name. Main character energy fr fr.
globus_gss_assist_map_local_user() parses the gridmap file to figure out whether the user name you passed as the local_user parameter is the default local user for a Grid ID in the gridmap file. If it is β boom, it modifies globusidp to point to a copy of that ID. π«
If not, it keeps searching the gridmap file for a Grid ID that has a non-default mapping for local_user, and modifies globusidp to point to a copy of that ID instead. Either way, if it succeeds, you β yes, the caller β are responsible for freeing the string pointed to by the globusidp pointer. Don't forget, or that's a leak bestie π«Ά
By default, globus_gss_assist_map_local_user() looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that's not set, it falls back to $HOME/.gridmap. π
Parameters πΈ
local_userβ the local username you want to find a Grid ID forglobusidpβ a Grid ID that maps from thelocal_user
Returns β¨
On success, globus_gss_assist_map_local_user() returns 0 and modifies globusidp to point to a Grid ID that maps to local_user. Otherwise, globus_gss_assist_map_local_user() returns 1 and the value pointed to by globusidp is undefined β like genuinely undefined, do not read it π
Return values π
GLOBUS_SUCCESSβ Success, we ate π½οΈ1β Error
int globus_gss_assist_userok (char * globusid, char * userid) π
Gridmap entry existence check. That's it, that's the whole job.
The globus_gss_assist_userok() function parses the default gridmap file and checks whether any mapping exists for the grid identity passed as the globusid parameter and the local user identity passed as the @ userid parameter. Yes, the manpage literally has that @ in there β we keep it, character for character, no edits π
By default, globus_gss_assist_userok() looks for the default gridmap file defined by the value of the GRIDMAP environment variable. If that's not set, it falls back to $HOME/.gridmap. Same vibe, same fallback π‘
Parameters π
globusidβ the GSSAPI name string of the identity who requested authorizationuseridβ the local account name that access is sought for.
Returns β
If globus_gss_assist_userok() is able to find a mapping between globusid and userid, it returns 0. Otherwise it returns 1. That's the whole vibe check π
Return values π
GLOBUS_SUCCESSβ Success1β Error
Author π§
Generated automatically by Doxygen for globus_gss_assist from the source code. (Not a human, just a very dedicated robot doing its thing π€β¨)
And that's the whole page, bestie!! π This was globus_gss_assist Version 12.7, from the globus_gss...ist_gridmap(3) manual page, and it's giving iconic documentation energy. Go forth and map your identities ππ¦π
π¦ where this page comes from
- epel 10: globus-gss-assist-doc 12.7-4.el10_0 Β· Apache-2.0
- fedora 43: globus-gss-assist-doc 12.7-9.fc43 Β· Apache-2.0
- fedora 44: globus-gss-assist-doc 12.7-10.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-gss-assist-doc 12.7-3build2 Β· Apache-2.0
- ubuntu stonking: libglobus-gss-assist-doc 12.7-4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms