permissions

package
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpClusterImageRoleAuthorizations added in v0.9.0

func BumpClusterImageRoleAuthorizations(req router.Request, _ router.Response) error

BumpClusterImageRoleAuthorizations will bump the failing apps covered by a cluster image role authorization such that the app will be re-evaluated for image permissions.

func BumpImageRoleAuthorizations added in v0.9.0

func BumpImageRoleAuthorizations(req router.Request, _ router.Response) error

BumpImageRoleAuthorizations will bump the failing apps covered by an image role authorization such that the app will be re-evaluated for image permissions.

func CheckConsumerPermsAuthorized added in v0.9.0

func CheckConsumerPermsAuthorized(ctx context.Context, c kclient.Client, appInstance *v1.AppInstance, consumedPerms []v1.Permissions) ([]v1.Permissions, error)

func CheckPermissions added in v0.9.0

func CheckPermissions(req router.Request, _ router.Response) error

CheckPermissions checks various things related to permissions

a) if the image is allowed by the image allow rules (if enabled)
b) [if ImageRoleAuthorizations are enabled] if the authorized permissions for the appImage cover the permissions granted explicitly by the user or implicitly to the image (Authorized >= Granted)
c) if the permissions granted by the user or implicitly to the image cover the permissions requested by the app (Granted >= Requested)

*Note*: One thing that we do not cover here is permissions consumed from a service. Since that's dynamic and we cannot know the generated permissions at this point,
the IRA check (if enabled) will happen later, just before the actual Kubernetes resources get applied (once the service instances are ready).

func ConsumerPermissions added in v0.9.0

func ConsumerPermissions(req router.Request, resp router.Response) error

func CopyPromoteStagedAppImage

func CopyPromoteStagedAppImage(req router.Request, _ router.Response) error

CopyPromoteStagedAppImage copies the staged app image to the app image if - the staged app image is set - the permissions have been checked - there are no missing permissions - there are no image permissions denied (if ImageRoleAuthorizations are enabled) - the image is allowed by the image allow rules (if enabled)

func GetAppScopedPermissions added in v0.9.0

func GetAppScopedPermissions(app *v1.AppInstance, appSpec *v1.AppSpec) []v1.Permissions

func GetConsumerPermissions added in v0.9.0

func GetConsumerPermissions(ctx context.Context, c kclient.Client, appInstance *v1.AppInstance, containerName string, container v1.Container) (result v1.Permissions, _ error)

GetConsumerPermissions returns the permissions for a given container augmented with permissions from any services it depends on that expose consumer permissions

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL