Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/private datasets #1000

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ Recommendation: for ease of reading, use the following order:
- Fixed
-->

## [Unreleased]
### Changed
- Private Datasets:
- OSO: using user actors / dateset resources that come from the database
- Thus, any access check relies on real entities
- GQL, added `Dataset.visibility()` to get the current visibility value
- GQL, added `DatasetMut.setVisibility()` to be able to change the dataset visibility after it has been created
- Deletion of previously created (and unused) ReBAC-properties and reindexing
- OSO: updating the schema to use identifiers instead of names
- OSO: added resource storage for access speed
- E2E: Using the correct account in multi-tenant mode
- And also the possibility of set it up
- `DatasetOwnershipService`: moved to the `kamu-dataset` crate area & implemented via `DatasetEntryServiceImpl`
- GQL, `DatasetMetadata.currentUpstreamDependencies`: indication if datasets not found/not accessed
- GQL, `DatasetMetadata.currentDownstreamDependencies`: exclude datasets that cannot be accessed
- E2E: added the ability to create an account using CLI

## [0.214.0] - 2024-12-23
### Added
- New `kamu system decode` command that can decode an arbitrary block file for debugging
Expand Down
43 changes: 32 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ members = [
"src/infra/messaging-outbox/postgres",
"src/infra/messaging-outbox/sqlite",
# Adapters
"src/adapter/auth-oso",
"src/adapter/auth-oso-rebac",
"src/adapter/flight-sql",
"src/adapter/graphql",
"src/adapter/http",
Expand Down Expand Up @@ -167,7 +167,7 @@ kamu-messaging-outbox-sqlite = { version = "0.214.0", path = "src/infra/messagin
kamu-messaging-outbox-repo-tests = { version = "0.214.0", path = "src/infra/messaging-outbox/repo-tests", default-features = false }

# Adapters
kamu-adapter-auth-oso = { version = "0.214.0", path = "src/adapter/auth-oso", default-features = false }
kamu-adapter-auth-oso-rebac = { version = "0.214.0", path = "src/adapter/auth-oso-rebac", default-features = false }
kamu-adapter-flight-sql = { version = "0.214.0", path = "src/adapter/flight-sql", default-features = false }
kamu-adapter-graphql = { version = "0.214.0", path = "src/adapter/graphql", default-features = false }
kamu-adapter-http = { version = "0.214.0", path = "src/adapter/http", default-features = false }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Start re-indexing.
DELETE
FROM auth_rebac_properties;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Start re-indexing.
DELETE
FROM auth_rebac_properties;
58 changes: 56 additions & 2 deletions resources/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ type Dataset {
"""
kind: DatasetKind!
"""
Returns the visibility of dataset
"""
visibility: DatasetVisibilityOutput!
"""
Access to the data of the dataset
"""
data: DatasetData!
Expand Down Expand Up @@ -642,11 +646,11 @@ type DatasetMetadata {
"""
Current upstream dependencies of a dataset
"""
currentUpstreamDependencies: [Dataset!]!
currentUpstreamDependencies: [DependencyDatasetResult!]!
"""
Current downstream dependencies of a dataset
"""
currentDownstreamDependencies: [Dataset!]!
currentDownstreamDependencies: [DependencyDatasetResult!]!
"""
Current polling source used by the root dataset
"""
Expand Down Expand Up @@ -718,6 +722,10 @@ type DatasetMut {
Manually advances the watermark of a root dataset
"""
setWatermark(watermark: DateTime!): SetWatermarkResult!
"""
Set visibility for the dataset
"""
setVisibility(visibility: DatasetVisibilityInput!): SetDatasetVisibilityResult!
}

scalar DatasetName
Expand Down Expand Up @@ -764,6 +772,13 @@ enum DatasetVisibility {
PUBLIC
}

input DatasetVisibilityInput @oneOf {
private: PrivateDatasetVisibilityInput
public: PublicDatasetVisibilityInput
}

union DatasetVisibilityOutput = PrivateDatasetVisibility | PublicDatasetVisibility

type Datasets {
"""
Returns dataset by its ID
Expand Down Expand Up @@ -834,6 +849,20 @@ type DeleteResultSuccess implements DeleteResult {
message: String!
}

interface DependencyDatasetResult {
message: String!
}

type DependencyDatasetResultAccessible implements DependencyDatasetResult {
dataset: Dataset!
message: String!
}

type DependencyDatasetResultNotAccessible implements DependencyDatasetResult {
id: DatasetID!
message: String!
}

type DisablePollingSource {
dummy: String
}
Expand Down Expand Up @@ -1515,11 +1544,27 @@ type PrepStepPipe {
command: [String!]!
}

type PrivateDatasetVisibility {
dummy: String
}

input PrivateDatasetVisibilityInput {
dummy: String
}

input PropagationMode @oneOf {
custom: FlowConfigurationResetCustom
toSeed: FlowConfigurationResetToSeedDummy
}

type PublicDatasetVisibility {
anonymousAvailable: Boolean!
}

input PublicDatasetVisibilityInput {
anonymousAvailable: Boolean!
}

type Query {
"""
Returns the version of the GQL API
Expand Down Expand Up @@ -1727,6 +1772,15 @@ type SetDataSchema {
schema: DataSchema!
}

interface SetDatasetVisibilityResult {
message: String!
}

type SetDatasetVisibilityResultSuccess implements SetDatasetVisibilityResult {
dummy: String
message: String!
}

interface SetFlowCompactionConfigResult {
message: String!
}
Expand Down
Loading
Loading