openfga-scim-bridge

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: Apache-2.0

README

SCIM Bridge

This is a PoC (work in progress) for a SCIM Bridge taken from the skyscraper project.

The implementation is still in a rough state and is missing essential tests, but covers SCIM V2 for Okta.

Expect major changes as this project matures.

Project Goals

  • To have a SCIM V2 bridge.
  • To initially cover Okta's implementation of SCIM, but eventually fulfil the entire specification.
  • To be flexible enough to allow for individual applications to implement their own business logic.

Development Environment

Please use the example application located in the example directory for development. It serves as a sample application using SCIM bridge library and OpenFGA.

Prerequisites

Local Environment:

  • PostgresSQL
  • golang 1.19+
  • sqlc
    • go install github.com/kyleconroy/sqlc/cmd/sqlc@latest
Database Migrations

The database migration files are at cmd/app/migrate/migrations. They're embedded into the binary, and we read them in the migrate command.

Migrate Up:

go run ./cmd/main.go migrate up

Migrate Down:

go run ./cmd/main.go migrate down
Generate Database files

Notes:

  • The queries are located in the queries.sql file.
  • The config file for sqlc is located at sqlc.yaml.
  • The database files are generated at internal/db.

Run the following command to generate the database files:

sqlc generate
Deploy Locally

The example application is located in the example directory.

  1. Copy config.yaml.example to config.yaml and fill in the values.
  2. Build the server:
    go build ./cmd/main.go
    
  3. Run database migrations:
    go run ./cmd/main.go migrate up
    
  4. Run the server:
    go run ./cmd/main.go server
    

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL