SignonSecurityContext

SignonSecurityContext — representation of a security context.

Functions

Types and Values

Object Hierarchy

    GBoxed
    ╰── SignonSecurityContext

Description

The SignonSecurityContext represents a security context within system and also within application. Security contexts are used:

  • within identities to specify the owner of the identity, and users of the identity (items on the access control list). See SignonIdentity.

  • by gSSO daemon to identify the application accessing the gSSO service and to determine if the application is an identity's owner, or is on the identity's access control list, and make access control decisions accordingly.

SignonSecurityContext contains two strings: a system context and an application context.

System context can be a binary path, SMACK-label, or MSSF token. Specific interpretation of the system context value is performed by a gSSO extension module. The default gSSO extension expects binary paths.

Application context identifies a script or a webpage within an application, and it's used for providing access control to runtime environments (when making an access control decision requires not only a binary identifier, but also information about what the binary is doing).

System context and application context can contain a wildcard operator "*" to match 'any', while "" matches 'none' when a default gSSO extension is used. The system context is always evaluated first and if a match is found, only then the application context is evaluated. Check the documentation of a platform specific extension to determine any particular match rules used by a custom ACM (Access Control Manager).

Functions

signon_security_context_new ()

SignonSecurityContext *
signon_security_context_new ();

Allocates a new security context item.

Returns

allocated SignonSecurityContext.

[transfer full]


signon_security_context_new_from_values ()

SignonSecurityContext *
signon_security_context_new_from_values
                               (const gchar *system_context,
                                const gchar *application_context);

Allocates and initializes a new security context item.

Parameters

system_context

system security context (such as SMACK/MSSF label/token).

 

application_context

application security context (such as a script name).

 

Returns

allocated SignonSecurityContext.

[transfer full]


signon_security_context_free ()

void
signon_security_context_free (SignonSecurityContext *ctx);

Frees a security context item.

Parameters

ctx

SignonSecurityContext to be freed.

 

signon_security_context_copy ()

SignonSecurityContext *
signon_security_context_copy (const SignonSecurityContext *src_ctx);

Copy a security context item.

Parameters

src_ctx

source security context to copy.

 

Returns

a copy of the SignonSecurityContext item.

[transfer full]


signon_security_context_set_system_context ()

void
signon_security_context_set_system_context
                               (SignonSecurityContext *ctx,
                                const gchar *system_context);

Sets the system context part (such as SMACK label or MSSF token) of the SignonSecurityContext.

Parameters

ctx

SignonSecurityContext item.

 

system_context

system security context.

 

signon_security_context_get_system_context ()

const gchar *
signon_security_context_get_system_context
                               (const SignonSecurityContext *ctx);

Get the system context part (such as SMACK label or MSSF token) of the SignonSecurityContext.

Parameters

ctx

SignonSecurityContext item.

 

Returns

system context.

[transfer none]


signon_security_context_set_application_context ()

void
signon_security_context_set_application_context
                               (SignonSecurityContext *ctx,
                                const gchar *application_context);

Sets the application context part (such as a script name or a web page) of the SignonSecurityContext.

Parameters

ctx

SignonSecurityContext item.

 

application_context

application security context.

 

signon_security_context_get_application_context ()

const gchar *
signon_security_context_get_application_context
                               (const SignonSecurityContext *ctx);

Get the application context part (such as script name or a web page) of the SignonSecurityContext.

Parameters

ctx

SignonSecurityContext item.

 

Returns

application context.

[transfer none]


signon_security_context_build_variant ()

GVariant *
signon_security_context_build_variant (const SignonSecurityContext *ctx);

Build a GVariant of type "(ss)" from a SignonSecurityContext item.

Parameters

ctx

SignonSecurityContext item.

 

Returns

GVariant construct of a SignonSecurityContext.

[transfer full]


signon_security_context_deconstruct_variant ()

SignonSecurityContext *
signon_security_context_deconstruct_variant
                               (GVariant *variant);

Builds a SignonSecurityContext item from a GVariant of type "(ss)".

Parameters

variant

GVariant item with a SignonSecurityContext construct.

 

Returns

SignonSecurityContext item.

[transfer full]


signon_security_context_list_build_variant ()

GVariant *
signon_security_context_list_build_variant
                               (const SignonSecurityContextList *list);

Builds a GVariant of type "a(ss)" from a GList of SignonSecurityContext items.

Parameters

Returns

GVariant construct of a SignonSecurityContextList.

[transfer full]


signon_security_context_list_deconstruct_variant ()

SignonSecurityContextList *
signon_security_context_list_deconstruct_variant
                               (GVariant *variant);

Builds a GList of SignonSecurityContext items from a GVariant of type "a(ss)".

Parameters

variant

GVariant item with a list of security context tuples.

 

Returns

SignonSecurityContextList item.

[transfer full]


signon_security_context_list_copy ()

SignonSecurityContextList *
signon_security_context_list_copy (const SignonSecurityContextList *src_list);

Copies a GList of SignonSecurityContext items.

Parameters

src_list

source SignonSecurityContextList.

 

Returns

SignonSecurityContextList item.

[transfer full]


signon_security_context_list_free ()

void
signon_security_context_list_free (SignonSecurityContextList *seclist);

Frees all items and the GList of SignonSecurityContext.

Parameters

seclist

SignonSecurityContextList item.

[transfer full]

Types and Values

struct SignonSecurityContext

struct SignonSecurityContext {
    gchar *sys_ctx;
    gchar *app_ctx;
};

Security context descriptor used for access control checks.

Members

gchar *sys_ctx;

system context, such as SMACK-label, MSSF token or just a binary path.

 

gchar *app_ctx;

application context, such as a script or a web page.

 

SignonSecurityContextList

typedef GList SignonSecurityContextList;

GList of SignonSecurityContext items.