iam-service

command module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

[!WARNING] This Repository is under development and not ready for productive use. It is in an alpha stage. That means APIs and concepts may change on short notice including breaking changes or complete removal of apis.

Platform Mesh - iam-service

Build Status

Local dev

To run the application locally, create .env config file from .env.sample and run:

go run ./main.go serve

Description

The Platform Mesh iam-service exposes a graphql and a grpc API. The Graphql API is primarily used by user management UIs, while the GRPC API is used to authorize write calls into OpenFGA.

Features

  • Backend for frontend API's to manage user data
  • Write GRPC API to validate write requests into the FGA schema

Architecture overview

iam-servicehas 2 base layers

  • DB
  • Core layer, which is responsible for business logic. It is being called by consumer(or Transport layer) and interacts with all other layers(Hooks, etc.) Core layers also is responsible for the proper error handling and logging.

No-Op

If there is no actual implementation for an interface, you can find a no-op implementation in the ./pkg/interfaces/no-op package.

Packages

graph

This package contains the GraphQL models and resolvers as reusable code. The graph/platform-mesh.graphql file contains the schema.

Getting started

TBD

DataLoader

To seed Postgresql and FGA store with the initial data, you can use DataLoader job.

This job does 3 things:

  1. Imports FGA schema
  2. Loads data to FGA store
  3. Loads data to Postgresql
Prerequisites
  1. Postgresql
  2. OpenFGA server
Golang configuration

Dataloader uses the following fields from the ../intenral/pkg/config.Config struct:

  1. Config.Database must reflect your postgresql setup.
  2. Config.Openfga must reflect your FGA server setup.
Quickstart

Dataloader needs the following params:

  1. schema - path to the FGA schema file (you can find the example in ./contract-tests/assets)
  2. file - path to the FGA data (you can find the example in ./contract-tests/assets)
  3. tenants - list of tenants to load data for
Terminal
go run main.go dataload --schema=$SCHEMA_PATH  --file=$DATA_PATH --tenants=tenant1,tenant2

Releasing

The release is performed automatically through a GitHub Actions Workflow. All the released versions will be available through access to GitHub (as any other Golang Module).

Requirements

The iam-service requires a installation of go. Checkout the go.mod for the required go version and dependencies.

Contributing

Please refer to the CONTRIBUTING.md file in this repository for instructions on how to contribute to Platform Mesh.

Code of Conduct

Please refer to the CODE_OF_CONDUCT.md file in this repository information on the expected Code of Conduct for contributing to Platform Mesh.

Licensing

Copyright 2024 SAP SE or an SAP affiliate company and Platform Mesh contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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