-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Please describe the change you have made. ## Checklist - [ ] Tests added/updated. - [ ] Run Demo Job Locally. - [ ] Documentation updated. - [ ] Changelogs updated in [CHANGELOG.cdf-tk.md](https://github.com/cognitedata/toolkit/blob/main/CHANGELOG.cdf-tk.md). - [ ] Template changelogs updated in [CHANGELOG.templates.md](https://github.com/cognitedata/toolkit/blob/main/CHANGELOG.templates.md). - [ ] Version bumped. [_version.py](https://github.com/cognitedata/toolkit/blob/main/cognite/cognite_toolkit/_version.py) and [pyproject.toml](https://github.com/cognitedata/toolkit/blob/main/pyproject.toml) per [semantic versioning](https://semver.org/).
- Loading branch information
Showing
35 changed files
with
427 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
,,,,,,, ******** | ||
,,,,,,,,,,,,********** | ||
,,,,,,,,,,,,,,,,,********* | ||
,,,,,,,,,,,,,,,,,,,********** | ||
,,,,,,,,,,,,,,,,,,,********** | ||
,,,,,,,,,,,,,,,,,********* | ||
,,,,,,,,,,,,********** | ||
,,,,,,, ******** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
cognite_toolkit/_builtin_modules/examples/cdf_location_example/default.config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## location filter | ||
location_external_id : <not_set> | ||
location_name : <not_set> | ||
location_parent_id : <not_set> | ||
location_description : <not_set> | ||
location_data_model_external_id : CogniteCore | ||
location_data_model_space : sp_core_data_modecdf_cdm | ||
location_data_model_version : v1 | ||
location_instance-space : <not_set> | ||
## view | ||
location_view_external_id : <not_set> | ||
location_view_space : <not_set> | ||
location_view_version : <not_set> | ||
location_view_represents_entity : <not_set> | ||
## scene | ||
#location_scene_external_id : <not_set> | ||
#location_scene_space : <not_set> | ||
## optional to use with asset hierarchy | ||
#location_asset_dataset_external_id : <not_set> | ||
#location_asset_subtree_external_id : <not_set> | ||
#location_event_dataset_external_id : <not_set> | ||
#location_file_dataset_external_id : <not_set> | ||
#location_timeseries_dataset_external_id : <not_set> | ||
#location_timeseries_prefix : <not_set> | ||
#location_sequences_prefix : <not_set> | ||
#location_dataset_external_id : <not_set> | ||
#location_general_external_id_prefix : <not_set> |
43 changes: 43 additions & 0 deletions
43
..._builtin_modules/examples/cdf_location_example/locations/assetCentric.LocationFilter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
externalId: '{{ location_external_id }}' | ||
name: '{{ location_name }}' | ||
parentId: '{{ location_parent_id }}' | ||
description: '{{ location_description }}' | ||
scene: | ||
externalId: '{{ location_scene_external_id }}' | ||
space: '{{ location_scene_space }}' | ||
assetCentric: | ||
assets: | ||
dataSetExternalIds: | ||
- '{{ location_asset_dataset_external_id }}' | ||
assetSubtreeIds: | ||
- externalId: '{{ location_asset_subtree_external_id }}' | ||
externalIdPrefix: asset-prefix | ||
events: | ||
dataSetExternalIds: | ||
- '{{ location_event_dataset_external_id }}' | ||
assetSubtreeIds: | ||
- externalId: '{{ location_asset_subtree_external_id }}' | ||
externalIdPrefix: event-prefix | ||
files: | ||
dataSetExternalIds: | ||
- '{{ location_file_dataset_external_id }}' | ||
assetSubtreeIds: | ||
- externalId: '{{ location_asset_subtree_external_id }}' | ||
externalIdPrefix: file-prefix | ||
timeseries: | ||
dataSetExternalIds: | ||
- '{{ location_timeseries_dataset_external_id }}' | ||
assetSubtreeIds: | ||
- externalId: '{{ location_asset_subtree_external_id }}' | ||
externalIdPrefix: '{{ location_timeseries_prefix }}' | ||
sequences: | ||
dataSetExternalIds: | ||
- '{{ location_timeseries_dataset_external_id }}' | ||
assetSubtreeIds: | ||
- externalId: '{{ location_asset_subtree_external_id }}' | ||
externalIdPrefix: '{{ location_sequences_prefix }}' | ||
dataSetExternalIds: | ||
- '{{ location_dataset_external_id }}' | ||
assetSubtreeIds: | ||
- externalId: '{{ location_asset_subtree_external_id }}' | ||
externalIdPrefix: '{{ location_general_external_id_prefix }}' |
18 changes: 18 additions & 0 deletions
18
...lkit/_builtin_modules/examples/cdf_location_example/locations/example.LocationFilter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
externalId: '{{ location_external_id }}' | ||
name: '{{ location_name }}' | ||
parentId: '{{ location_parent_id }}' | ||
description: '{{ location_description }}' | ||
dataModels: | ||
- externalId: '{{ location_data_model_external_id }}' | ||
space: '{{ location_data_model_space }}' | ||
version: '{{ location_data_model_version }}' | ||
instanceSpaces: | ||
- '{{ location_instance-space}}' | ||
scene: | ||
externalId: '{{ location_scene_external_id }}' | ||
space: '{{ location_scene_space }}' | ||
views: | ||
externalId: '{{ location_view_external_id }}' | ||
space: '{{ location_view_space }}' | ||
version: '{{ location_view_version }}' | ||
representsEntity: '{{ location_view_represents_entity }}' |
7 changes: 7 additions & 0 deletions
7
cognite_toolkit/_builtin_modules/examples/cdf_location_example/module.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[module] | ||
title = "Example location filter" | ||
|
||
[packages] | ||
tags = [ | ||
"examples", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.3.0b3" | ||
__version__ = "0.3.0b4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
environment: | ||
name: dev | ||
project: needle | ||
type: dev | ||
selected: | ||
- modules/ | ||
|
||
variables: | ||
modules: | ||
common: | ||
cdf_auth_readwrite_all: | ||
readwrite_source_id: da20b44a-236a-4e6e-9f46-68f741df2315 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Module: cdf_auth_readwrite_all | ||
|
||
This is a foundational module used by the `cdf-tk` tool as the default | ||
auth module for read-write access to all CDF resources for the tool itself (admin or CI/CD pipeline), | ||
as well as default read-only access for admin access in the UI. | ||
|
||
This structure is based on the concept of ONLY the tool having write access to the entities | ||
that are controlled by the templates. Everybody else should either have no access or read-only access. | ||
|
||
## Managed resources | ||
|
||
This module manages the following resources: | ||
|
||
1. a group with read-write access (`gp_cicd_all_read_write`) to everything in a CDF project (for `cdf-tk` as an admin | ||
tool or through a CI/CD pipeline). | ||
2. a group with read-only access `gp_cicd_all_read_only` (for viewing configurations from UI). | ||
|
||
## Variables | ||
|
||
The following variables are required and defined in this module: | ||
|
||
| Variable | Description | | ||
|----------|-------------| | ||
|readwrite_source_id| The source ID of the group that should be granted read-write access to all resources in the project. | | ||
|readonly_source_id| The source ID of the group that should be granted read-only access to all resources in the project.| | ||
|
||
## Usage | ||
|
||
The `gp_cicd_all_read_write` group is used default by the `cdf-tk auth verify` command to verify correct access to | ||
resources in a project. The groups are default part of several packages that are created by the `cdf-tk` tool. | ||
|
||
If you have different needs for the readwrite and readonly groups, you can copy this module into `custom_modules`, rename | ||
it (remove the cdf_ prefix), and change which modules are deployed in your `environments.yaml` file. You can also | ||
use the `cdf-tk verify --group-file=/path/to/group.yaml` command to switch out the default group file with your own. |
Oops, something went wrong.