mirror of
https://github.com/SigNoz/signoz.git
synced 2026-02-03 08:33:26 +00:00
* feat(authz): base setup for public shareable dashboards * feat(authz): add support for public masking * feat(authz): added public path for gettable public dashboard * feat(authz): checkpoint-1 for widget query to query range conversion * feat(authz): checkpoint-2 for widget query to query range conversion * feat(authz): fix widget index issue * feat(authz): better handling for dashboard json and query * feat(authz): use the default time range if timerange is disabled * feat(authz): use the default time range if timerange is disabled * feat(authz): add authz changes * feat(authz): integrate role with dashboard anonymous access * feat(authz): integrate the new middleware * feat(authz): integrate the new middleware * feat(authz): add back licensing * feat(authz): renaming selector callback * feat(authz): self review * feat(authz): self review * feat(authz): change to promql
32 lines
1.4 KiB
Go
32 lines
1.4 KiB
Go
package authz
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SigNoz/signoz/pkg/factory"
|
|
"github.com/SigNoz/signoz/pkg/types/authtypes"
|
|
"github.com/SigNoz/signoz/pkg/valuer"
|
|
openfgav1 "github.com/openfga/api/proto/openfga/v1"
|
|
)
|
|
|
|
type AuthZ interface {
|
|
factory.Service
|
|
|
|
// Check returns error when the upstream authorization server is unavailable or the subject (s) doesn't have relation (r) on object (o).
|
|
Check(context.Context, *openfgav1.TupleKey) error
|
|
|
|
// CheckWithTupleCreation takes upon the responsibility for generating the tuples alongside everything Check does.
|
|
CheckWithTupleCreation(context.Context, authtypes.Claims, valuer.UUID, authtypes.Relation, authtypes.Relation, authtypes.Typeable, []authtypes.Selector) error
|
|
|
|
CheckWithTupleCreationWithoutClaims(context.Context, valuer.UUID, authtypes.Relation, authtypes.Relation, authtypes.Typeable, []authtypes.Selector) error
|
|
|
|
// Batch Check returns error when the upstream authorization server is unavailable or for all the tuples of subject (s) doesn't have relation (r) on object (o).
|
|
BatchCheck(context.Context, []*openfgav1.TupleKey) error
|
|
|
|
// Write accepts the insertion tuples and the deletion tuples.
|
|
Write(context.Context, []*openfgav1.TupleKey, []*openfgav1.TupleKey) error
|
|
|
|
// Lists the selectors for objects assigned to subject (s) with relation (r) on resource (s)
|
|
ListObjects(context.Context, string, authtypes.Relation, authtypes.Typeable) ([]*authtypes.Object, error)
|
|
}
|