Giter Site home page Giter Site logo

cardano-foundation / cf-explorer-authentication Goto Github PK

View Code? Open in Web Editor NEW
1.0 11.0 0.0 5.37 MB

The Explorer Authentication API enables users to log in, with or without a wallet, to share personalized data such as bookmarks across devices

Home Page: https://cardano-foundation.github.io/cf-explorer-authentication/

License: Apache License 2.0

Shell 0.17% Dockerfile 0.31% Makefile 0.01% Java 57.21% Smarty 42.30%
authentication cardano explorer java spring-boot

cf-explorer-authentication's Introduction

Explorer Authentication

Tests Coverage Release Publish FOSSA Status conventionalcommits

The Explorer Authentication API enables users to log in, with or without a wallet, to share personalized data such as bookmarks across devices.

๐Ÿ‘‰ Check the Explorer repository to understand how the microservices work together

๐Ÿงช Test Reports

To ensure the stability and reliability of this project, unit and mutation tests have been implemented. By clicking on the links below, you can access the detailed test reports and review the outcomes of the tests performed.

๐Ÿ“Š Coverage Report

๐Ÿ“Š Mutation Report

Getting Started

Prerequisites

  • Docker && Docker Compose

Installing

  • Clone this repository
  • Copy ./.m2/settings.default.xml.tpl to ./.m2/settings.xml
  • Fill {PRIVATE_MVN_REGISTRY_URL}, {PRIVATE_MVN_REGISTRY_USER} and {PRIVATE_MVN_REGISTRY_PASS} in ./.m2/settings.xml
  • Copy .env.example to .env
  • Fill the .env file with your values (explain below)
  • Create if not exists external network infrastructure-net-local with docker network create infrastructure-net-local
  • Run docker-compose -f docker-compose-local.yml up -d to start the containers

Environment variables

  • SPRING_PROFILES_ACTIVE : Spring profile [local, dev, test, prod], plus Redis Profiles. See Below. Default is local.
  • SWAGGER_CLIENT_URL : Domain client
  • SWAGGER_SERVER_URL : Domain server
  • TIME_TO_LIVE_REDIS_SIGN_OUT : Time to live on Redis

We have 3 options for redis cache:

  • redis standalone

    • REDIS_STANDALONE_HOST : Redis hostname eg. 127.0.0.1.
    • REDIS_STANDALONE_PORT : Redis ort, eg. 6379.
    • REDIS_STANDALONE_PASSWORD : Redis password. Default bitnami.
  • redis sentinel

    • REDIS_MASTER_NAME : Redis master name. Default is mymaster.
    • REDIS_SENTINEL_PASS : Redis sentinel password. Default is redis_sentinel_pass.
    • REDIS_SENTINEL_HOST : Redis sentinel host. Default is cardano.redis.sentinel.
  • redis-cluster

    • NODE_ADDRESSES: List of redis cluster nodes host and port.
    • REDIS_CLUSTER_PASSWORD: Password of redis cluster.

RSA key

  • RSA_PUBLIC_KEY_AUTH : RSA Public Key used to decode the JWT string generated during login. This key obtained from Keycloak.
  • RSA_PRIVATE_KEY_MAIL : RSA Private Key used to encode verify email, generated by executing a command: openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048.
  • RSA_PUBLIC_KEY_MAIL : RSA Public Key used to decode verify code in verify email, generated by executing a command: openssl rsa -pubout -in private_key.pem -out public_key.pem.

Keycloak configure

  • KEYCLOAK_REALM_NAME : Realm name on Keycloak.
  • KEYCLOAK_SERVER_URL : Domain Keycloak.
  • KEYCLOAK_CLIENT_ID : Client ID on Keycloak.
  • KEYCLOAK_CLIENT_SECRET : Client secret on Keycloak.
  • KEYCLOAK_ROLE_MAPPING : Allow access to resources on Keycloak after assigning roles. Default is true.
  • KEYCLOAK_BEARER_ONLY : The application only accepts requests containing tokens in the Authorization header using the Bearer authentication method. Default is true.

cf-explorer-authentication's People

Contributors

fabianbormann avatar github-actions[bot] avatar hiiamtrong avatar m4rc0russ0 avatar nemo83 avatar rcmorano avatar satran004 avatar sotatek-ducphung avatar sotatek-haipham2 avatar sotatek-hungnguyen avatar sotatek-huyle3 avatar sotatek-phucnguyen5 avatar sotatek-thinhvu avatar sotatek-trongvu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.