Skip to content

1. before creating a policy for a resource, subscribe to it. #163

Open
@github-actions

Description

@github-actions

should be done in lua on resource creation? yes, but in this case,

we need to be able to ensure that the synched policies are created

for the tenant where the new resource is created (i.e. we need to pass

the correct headers in the subscription process), otherwise

the correct headers in the subscription process), otherwise

  • in case of IS_PRIVATE_ORG=FALSE - we won't know the tenant for the resource

and we will create policy in tenant 'Default' which would

be wrong ).

# TODO: 1. before creating a policy for a resource, subscribe to it.

    else:
        return serialize_policy(db_policy)

# TODO: 0. if at least provider exists (beyond the node itself), we should not
# create default policies in lua
# TODO: 1. before creating a policy for a resource, subscribe to it.
# should be done in lua on resource creation? yes, but in this case,
# we need to be able to ensure that the synched policies are created
# for the tenant where the new resource is created (i.e. we need to pass
# the correct headers in the subscription process), otherwise
# - in case of IS_PRIVATE_ORG=FALSE - we won't know the tenant for the resource
# and we will create policy in tenant 'Default' which would
# be wrong ).


@router.post("/",
             response_class=Response,
             status_code=status.HTTP_201_CREATED,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions