Skip to content

Commit

Permalink
Merge pull request #16 from bcgov-nr/feat/brokerSupport
Browse files Browse the repository at this point in the history
feat: add broker support
  • Loading branch information
mbystedt authored Jul 19, 2023
2 parents 0dbc579 + 3cd9a5c commit 101953d
Show file tree
Hide file tree
Showing 15 changed files with 2,493 additions and 1,954 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/auth-sync-app-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_branch }}
- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm ci
- run: npm run lint
6 changes: 4 additions & 2 deletions .github/workflows/auth-sync-app-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
token: ${{ secrets.GH_PAT }}
path: config

- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm ci

# Runs script to obtain CSS secrets
Expand All @@ -50,6 +50,8 @@ jobs:
- name: Member Sync
run: ./bin/dev member-sync
env:
BROKER_API_URL: ${{ secrets.BROKER_API_URL }}
BROKER_TOKEN: ${{ secrets.BROKER_TOKEN }}
CSS_TOKEN_URL: ${{ secrets.CSS_TOKEN_URL }}
CSS_CLIENT_ID: ${{ secrets.CSS_CLIENT_ID }}
CSS_CLIENT_SECRET: ${{ secrets.CSS_CLIENT_SECRET }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/setenv.sh.tmp

This file was deleted.

30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ $ ./bin/run (-v|--version|version)

# Commands
<!-- commands -->
* [`authtool help [COMMAND]`](#authtool-help-command)
* [`authtool help [COMMANDS]`](#authtool-help-commands)
* [`authtool member-sync`](#authtool-member-sync)
* [`authtool role-sync`](#authtool-role-sync)

## `authtool help [COMMAND]`
## `authtool help [COMMANDS]`

Display help for authtool.

```
USAGE
$ authtool help [COMMAND] [-n]
$ authtool help [COMMANDS] [-n]
ARGUMENTS
COMMAND Command to show help for.
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
Expand All @@ -64,19 +64,23 @@ DESCRIPTION
Display help for authtool.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.19/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.12/src/commands/help.ts)_

## `authtool member-sync`

Syncs Developers from Jira projects to Css
Syncs user and role configuration to CSS

```
USAGE
$ authtool member-sync [-h] [--css-token-url <value>] [--css-client-id <value>] [--css-client-secret <value>]
[--jira-host <value>] [--jira-base-url <value>] [--jira-username <value>] [--jira-password <value>]
$ authtool member-sync [-h] [--broker-api-url <value>] [--broker-token <value>] [--config-path <value>]
[--css-token-url <value>] [--css-client-id <value>] [--css-client-secret <value>] [--jira-host <value>]
[--jira-base-url <value>] [--jira-username <value>] [--jira-password <value>]
FLAGS
-h, --help show CLI help
--broker-api-url=<value> [default: https://nr-broker.apps.silver.devops.gov.bc.ca/api/] The broker api base url
--broker-token=<value> The broker JWT
--config-path=<value> [default: ./config] The path to the config directory
--css-client-id=<value> [default: id] The css keycloak client id
--css-client-secret=<value> [default: password] The css keycloak client secret
--css-token-url=<value> [default: url] The css token url
Expand All @@ -86,28 +90,30 @@ FLAGS
--jira-username=<value> [default: admin] The Jira user
DESCRIPTION
Syncs Developers from Jira projects to Css
Syncs user and role configuration to CSS
EXAMPLES
$ authtool member-sync
```

## `authtool role-sync`

Syncs roles to Css
Syncs roles to CSS

```
USAGE
$ authtool role-sync [-h] [--css-token-url <value>] [--css-client-id <value>] [--css-client-secret <value>]
$ authtool role-sync [-h] [--config-path <value>] [--css-token-url <value>] [--css-client-id <value>]
[--css-client-secret <value>]
FLAGS
-h, --help show CLI help
--config-path=<value> [default: ./config] The path to the config directory
--css-client-id=<value> [default: id] The css keycloak client id
--css-client-secret=<value> [default: password] The css keycloak client secret
--css-token-url=<value> [default: url] The css token url
DESCRIPTION
Syncs roles to Css
Syncs roles to CSS
EXAMPLES
$ authtool role-sync
Expand Down
Loading

0 comments on commit 101953d

Please sign in to comment.