Skip to content

smartSenseSolutions/managed-identity-wallet-ui

Repository files navigation

This is a UI application to access APIs of Eclipse Tractus-x Managed Identity Wallet

Prerequisites

  1. Node with version >= v16.16
  2. Yarn (Package Manager) >=1.22
  3. A managed identity wallet must be running
  4. Keycloak must be running and configured correctly
  5. MIW and UI applications must be using the same keycloak
  6. Allowed web origin must be added in keycloak public client
  7. CORS must be enabled in the managed identity wallet application

Run in Local

Run keycloak

  1. Go to dev-assets folder and run docker compose file, this will run keycloak and import miw_test realm with the needed configuration

  2. Test keycloak on http://localhost:28080

  3. There will be 2 user created as below:

    1. Username: catena-x

      password: password

      bpn: BPNL000000000000

      This user acts as the base wallet

    2. Username: user1

      password: password

      bpn : BPNL000000000001

      this user act as normal user(any business partner, you can create wallet using this BPN)

Run MIW API application

  1. Enable CORSS in MIW application by adding the below code in SecurityConfig.java
    @Bean
    CorsConfigurationSource corsConfigurationSource() {
        CorsConfiguration configuration = new CorsConfiguration();
        configuration.setAllowedOrigins(Arrays.asList("http://localhost:3004"));   //changes as per your port and host name
        configuration.setAllowedMethods(Arrays.asList("GET", "POST", "OPTIONS", "PUT", "DELETE"));
        configuration.setAllowedHeaders(
                List.of("X-Requested-With", "X-HTTP-Method-Override", "Content-Type", "Authorization", "Accept",
                        "Access-Control-Allow-Credentials", "Access-Control-Allow-Origin"));
        configuration.setAllowCredentials(true);
        //configuration.addAllowedHeader("Authorization");
        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
        source.registerCorsConfiguration("/**", configuration);
        return source;
    }
  1. Set keycoak related setting application.yaml.
  2. Start application

Run UI application

  1. Update values in .env.local as per needed
  2. Start the application using yarn start

Sample Demo

MIW_demo.mp4

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

About

Eclipse Tractus-x Managed Identity Wallet UI application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages