Interface nsIExpandedPrincipalType

If SystemPrincipal is too risky to use, but we want a principal to access more than one origin, ExpandedPrincipals letting us define an array of principals it subsumes. So script with an ExpandedPrincipals will gain same origin access when at least one of its principals it contains gained sameorigin acccess. An ExpandedPrincipal will be subsumed by the system principal, and by another ExpandedPrincipal that has all its principals. It is added for jetpack content-scripts to let them interact with the content and a well defined set of other domains, without the risk of leaking out a system principal to the content. See: Bug 734891

Hierarchy

Properties

csp: nsIContentSecurityPolicy

Bug 1548468: Move CSP off ExpandedPrincipal.

A Content Security Policy associated with this principal. Use this function to query the associated CSP with this principal.

NOTE: Main-Thread Only.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • An array of principals that the expanded principal subsumes.

    When an expanded principal is used as a triggering principal for a request that inherits a security context, one of its constitutent principals is inherited rather than the expanded principal itself. The last principal in the allowlist is the default principal to inherit.

    Note: this list is not reference counted, it is shared, so should not be changed and should only be used ephemerally.

    May be called from any thread.

    Returns PrincipalArray

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

Generated using TypeDoc