akshay196-rafay a2f03c60da Authentication interceptor (#14)
Changes in this PR include
- Authenticate gRPC requests
- Initial file structure for authentication and authorization service
- Use Auth middleware and interceptor service in usermgmt component
- Authenticate HTTP request based on Kratos API token
- Add Auth middleware to adminsrv component
- Name the Grpc metadata fields
- Maintain session data after authentication
- Removed http middleware as it is not necessary
- Exclude rpc methods from authentication
- Handle error in auth interceptor
- Revert to with cancel context
- Log authentication failed requests and New function in authv3
- Initiate authContext struct in authv3 package using new public
- function NewAuthContext.
2022-02-23 11:18:49 +05:30
2022-02-03 11:04:01 +05:30
2022-02-03 11:04:01 +05:30
2022-01-12 17:35:38 +05:30

rcloud-base

rcloud-base

Setting up the database

Create the initial db/user

Example for admindb:

create database admindb;
create user admindbuser;

Now in the newly created db:

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
grant execute on function uuid_generate_v4() to admindbuser;

This will grant the necessary permission to the newly created user to run uuid_generate_v4()

Run application migrations

We use golang-migrate to perform migrations.

Install golang-migrate

go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest

-tags 'postgres' is important as otherwise it compiles without postgres support

You can refer to the guide for full details.

Run migrations

Example for admindb:

export POSTGRESQL_URL='postgres://<user>:<pass>@<host>:<port>/admindb?sslmode=disable'
migrate -path ./persistence/migrations/admindb -database "$POSTGRESQL_URL" up

See cli-usage for more info.

Description
Languages
Go 99.2%
Jsonnet 0.5%
PLpgSQL 0.1%