Skip to content

Commit

Permalink
docs: update guides (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag authored Nov 8, 2022
1 parent 08d19f7 commit 51f6277
Show file tree
Hide file tree
Showing 9 changed files with 266 additions and 202 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ coverage: test
@go tool cover -html=coverage.out

build:
@echo " > Building guardian version ${VERSION}..."
@echo "Building guardian version ${VERSION}..."
go build -ldflags "-X ${NAME}/core.Version=${VERSION} -X ${NAME}/core.BuildCommit=${COMMIT}" -o dist/guardian .
@echo "Build complete"

Expand All @@ -59,10 +59,10 @@ config:
@cp internal/server/config.yaml config.yaml

proto:
@echo " > generating protobuf from odpf/proton"
@echo " > [info] make sure correct version of dependencies are installed using 'make install'"
@echo "Generating protobuf from odpf/proton"
@echo " [info] make sure correct version of dependencies are installed using 'make install'"
@buf generate https://github.com/odpf/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path odpf/guardian
@echo " > protobuf compilation finished"
@echo "Protobuf compilation finished"

setup:
@echo "Installing dependencies..."
Expand Down
File renamed without changes.
24 changes: 9 additions & 15 deletions docs/docs/installation/cli.md → docs/docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CLI Installation
# Installation

There are several approaches to install Guardian CLI
There are several approaches to install Guardian.

1. [Using a pre-compiled binary](#binary-cross-platform)
2. [Installing with package manager](#macOS)
Expand Down Expand Up @@ -105,14 +105,6 @@ Initialise client configurations
./guardian config init
```

### Verifying the installation​

To verify if Guardian is properly installed, run `guardian --help` on your system. You should see help output. If you are executing it from the command line, make sure it is on your PATH or you may get an error about Guardian not being found.

```
$ guardian --help
```

### Use the Docker image

We provide ready to use Docker container images. To pull the latest image:
Expand All @@ -127,13 +119,15 @@ To pull a specific version:
docker pull odpf/guardian:v0.3.2
```

If you like to have a shell alias that runs the latest version of pscale from docker whenever you type `pscale`:
### Verifying the installation​

To verify if Guardian is properly installed, run `guardian --help` on your system. You should see help output. If you are executing it from the command line, make sure it is on your PATH or you may get an error about Guardian not being found.

```
mkdir -p $HOME/.config/odpf
alias guardian="docker run -e HOME=/tmp -v $HOME/.config/odpf:/tmp/.config/odpf --user $(id -u):$(id -g) --rm -it -p 3306:3306/tcp odpf/guardian:latest"
$ guardian --help
```

### CLI Reference
### What's next

See the [CLI Reference](/docs/reference/cli) for a complete list of commands and options.
- See the [CLI Reference](/docs/reference/cli) for a complete list of commands and options.
- See the [deployment guide](./guides/deployment.md) on how to setup Guardian server.
7 changes: 0 additions & 7 deletions docs/docs/installation/installation.md

This file was deleted.

13 changes: 7 additions & 6 deletions docs/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@ Resource administrators need to register a data provider on Guardian along with
Users are required to raise an appeal to gain access to a particular resource. The appeal will go through all the approvals/steps defined for that particular resource before it gets approved and the access is granted to the user.

## Key Features
>
- **Provider Management**: Support various providers \(currently *BigQuery, Google Cloud Storage Metabase, Grafana, and Tableau, Google Cloud IAM* with more coming up!\) and multiple instances for each provider type.

- **Provider Management**: Support various providers \(currently _BigQuery, Google Cloud Storage Metabase, Grafana, and Tableau, Google Cloud IAM_ with more coming up!\) and multiple instances for each provider type.
- **Resource Management**: Resources from a provider are managed in Guardian's database. There is also an API to update the resource's metadata to add additional information.
- **Appeal-based access**: Users are expected to create an appeal for accessing data from registered providers. The appeal will get reviewed by the configured approvers before it gives access to the user.
- **Configurable approval flow**: The approval flow configures what is needed for an appeal to get approved and who is eligible to approve/reject. It can be configured and linked to a provider so that every appeal created to their resources will follow the procedure to get approved.
- **External Identity Manager**: This gives the flexibility to use any third-party identity manager. User properties.

## Using Guardian

You can manage the data access for your resource via Guardian in any of the following ways:

#### Guardian Command Line Interface
>

You can use the Guardian command line interface to issue commands and to perform the entire data access flow. Using the command line can be faster and more convenient than the console.
For more information on using the Guardian CLI, see the [CLI Reference](./reference/cli.md) page.

#### HTTPS API
>

You can get hands on appeal creation, approval updatation, access revocation and much more by using the Guardian HTTPS API, which lets you issue HTTPS requests directly to the service. When you use the HTTPS API, you must include the username in the request header, which will be used by [Shield](https://odpf.github.io/shield/) for authorization. For more information, see the [API Reference](/reference/api.md) page.

## Where to go from here
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/tour/configuration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Configuration
# Setup server

Guardian binary contains both the CLI client and the server itself. Each has it's own configuration in order to run. Server configuration contains information such as database credentials, log severity, etc. while CLI client configuration only has configuration about which server to connect.

Expand Down
48 changes: 22 additions & 26 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
module.exports = {
docsSidebar: [
'introduction',
'installation',
'roadmap',
{
label: 'installation',
type: 'category',
link: {
type: 'doc',
id: 'installation/installation',
},
type: "category",
label: "Tour",
items: [
"installation/cli",
"installation/server",
]
"tour/introduction",
"tour/configuration",
"tour/create-policy",
"tour/create-provider",
"tour/update-resource",
"tour/create-appeal",
"tour/approve-reject-appeal",
"tour/complex-use-case",
],
},
'roadmap',
{
type: "category",
label: "Concepts",
Expand All @@ -24,16 +27,9 @@ module.exports = {
},
{
type: "category",
label: "Tour",
label: "Guides",
items: [
"tour/introduction",
"tour/configuration",
"tour/create-policy",
"tour/create-provider",
"tour/update-resource",
"tour/create-appeal",
"tour/approve-reject-appeal",
"tour/complex-use-case",
"guides/deployment",
],
},
{
Expand Down Expand Up @@ -64,19 +60,19 @@ module.exports = {
"reference/configuration",
],
},
{
type: "category",
label: "Extend",
items: [
"contribute/provider",
]
},
{
type: "category",
label: "Contribute",
items: [
"contribute/architecture",
"contribute/contribution",
{
type: "category",
label: "Development Guide",
items: [
"contribute/provider",
]
},
],
},
],
Expand Down
179 changes: 109 additions & 70 deletions docs/static/assets/overview-bordered.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

1 comment on commit 51f6277

@vercel
Copy link

@vercel vercel bot commented on 51f6277 Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

guardian – ./

guardian-git-main-odpf.vercel.app
guardian-odpf.vercel.app
guardian-phi.vercel.app

Please sign in to comment.