The backend service for user management module of EdgeGallery platform.

Related tags

GUI edgegallery
Overview

User Management 用户管理

License

User Management 用户管理模块,为EdgeGallery提供了基本的用户增删改查功能,定义了用户的角色与权限,并且包含了两个关键特性:手机验证和单点登录(Single Sign On)能力。

角色定义

  • 租户 系统内的普通用户,可以创建项目/上传App等操作,租户之间数据不能相互访问;

  • 用户管理员 系统的用户管理员,可以对其他用户进行管理,修改用户信息与权限;

  • 访客 直接访问Portal时,默认是访客权限,只能浏览各平台的基本功能,不能做编辑或创建数据。

新注册的用户,默认是“租户”权限,“用户管理员”权限只能通过修改数据库获取,目前没有提供注册或编辑入口。

特性简介

  • 手机验证

    新用户在注册时,需要填写手机号和验证码,只有通过校验才能成功注册,一个手机号只能注册一个账户,忘记密码可以通过手机号找回;

    在登录时可以使用用户名与密码登录,也可以使用手机号与密码登录,手机号码与用户名都要求是唯一的。

    更多的架构设计可以点击这里

  • 单点登录

    User Management 用户管理提供单点登录能力,被User Management信任的平台可以使用同一个认证服务器,在任一平台登录后,登录有效期内在其他平台无需重复登录即可正常进入操作界面。目前被信任的平台有Developer Portal(开发者平台)、Application Store(应用仓库)和 MEC Platform(MEC 平台)。

    更多的架构设计可以点击这里

编译运行

User Management对外提供restful接口,基于开源ServiceComb微服务框架进行开发,并且集成了Spring Boot框架。能够在本地直接编译运行启动微服务,方便使用者进行本地调试。并且还可以制作成Docker镜像部署在普通Linux环境和Kubernetes集群。

  • 本地编译

    1.环境准备: 本地编译需要安装的工具包括jdk、maven、IDEA或Eclipse,此处默认已安装并配置好相关工具,如果没有安装,推荐参考此处安装本地开发环境

    Name Version Link
    OpenJDK1.8 1.8.0 download
    MavApache Maven 3.6.3 download
    IntelliJ IDEA Community download
    Servicecomb Service-Center 1.3.0 download
    Postgres 9.6.17 or above download
    Redis 3.2.100 or above download

    2.源码下载: 使用 git clone 或者下载压缩包的形式将User Management源代码下载到本地,默认master分支

    git clone https://gitee.com/edgegallery/user-mgmt.git

    3.ServiceCenter配置: User Management使用了开源的ServiceComb框架进行开发,服务在启动时会自动注册到指定的ServiceCenter,ServiceCenter会为服务提供注册与发现能力,供其他微服务进行调用。 在启动User Management前需要先在本地启动ServiceCenter。

    • 首先下载ServiceCenter,如Windows系统可以选择Windows的[Binary]版本,下载完成后解压;

    • 双击运行start-service-center.bat和start-frontend.bat即可在本地启动ServiceCenter和可视化面板,浏览器访问 http://127.0.0.1:30103 进行查看,ServiceCenter默认启动端口为30100;

    • 本地运行user-mgmt时,需要配置service-center地址,修改配置文件/src/main/resources/application.yaml,例如:

      servicecomb:
        service:
          registry:
            address: http://127.0.0.1:30100 #连接SC(Service Center,注册中心)的地址

    4.PostgreSQL数据库配置: User Management使用了开源的PostgreSQL数据库存储用户的信息,本地运行时需要先安装PostgreSQL。

    • 推荐参考此处安装和启动PostgreSQL,建议选择9.6或以上版本;

    • 使用文件/docker/user-mgmt-postgresql/postgres.sql初始化数据库表结构;

    • 修改文件/src/main/resources/application.yaml,指向本地数据库,例如:

      spring:
        datasource:
          url: jdbc:postgresql://localhost:5432/${POSTGRES_DB_NAME:usermgmtdb}
          username: ${POSTGRES_USERNAME}
          password: ${POSTGRES_PASSWORD}
          driver-class-name: org.postgresql.Driver

    ${POSTGRES_DB_NAME:usermgmtdb}:替换为本地部署的db名称

    ${POSTGRES_USERNAME}:替换为本地数据库的用户名

    ${POSTGRES_PASSWORD}:替换为本地数据库的密码

    5.Redis数据库配置: User Management使用了Redis数据库临时存储手机验证码,本地运行时需要先安装Redis。

    • 推荐参考此处安装和启动Redis

    • 修改文件/src/main/resources/application.properties,指向本地Redis,例如:

      ##### Redis config #####
      redis.ip=${REDIS_IP:127.0.0.1}
      redis.port=6379

    6.开始运行: 直接运行/src/main/java/org/mec/houp/user/MainServer.java文件中的main函数就能启动项目,此时可以尝试使用登录接口,但只能登录建立数据库表时默认插入的数据。 如果想要正常使用其他接口,如注册、修改等,需要在公有云平台购买短信验证码服务,如华为公有云。修改文件/src/main/resources/init.properties中的sms前缀对应的各项参数为公有云提供的参数后,即可顺利使用User Management的全部接口。

  • Kubernetes环境部署

    请参考helm_charts项目

You might also like...

Bir oyun yazmak istiyorsunuz. Bu yazılım için backend kodlarını JAVA ile geliştirmeyi planlıyoruz. Yeni üye, satış ve kampanya yönetimi yapılması isteniyor.

GameDemo1 Bir oyun yazmak istiyorsunuz. Bu yazılım için backend kodlarını JAVA ile geliştirmeyi planlıyoruz. Yeni üye, satış ve kampanya yönetimi yapı

May 18, 2021

A hotel management system desktop application, built with java SWT/Swing

A hotel management system desktop application, built with java SWT/Swing

A hotel management system desktop application, built with java SWT/Swing, with tabs to manage bookings, rooms, customers, payments, cancellations, hotel inventory orders, catering and a plan to visualize all the reservations for the month.

Jan 12, 2022

A GUI-based file manager based on a Java file management and I/O framework using object-oriented programming ideas.

A GUI-based file manager based on a Java file management and I/O framework using object-oriented programming ideas.

FileManager A GUI-based file manager based on a Java file management and I/O framework using object-oriented programming ideas. Enables folder creatio

Feb 7, 2022

Docking framework for JavaFX platform

Docking framework for JavaFX platform

Docking framework for JavaFX platform AnchorFX is a gratis and open source library for JavaFX to create graphical interfaces with docking features Anc

Oct 15, 2022

This repository contains all java related sources of the Dolphin Platform.

This repository contains all java related sources of the Dolphin Platform.

Dolphin Platform This repository contains all Java related sources of the Dolphin Platform. Clients for other languages can be found in seperate repos

Sep 5, 2022

A collection of tools and libraries for easier development on the JavaFX platform!

This project is archived I do not realistically have the time to take care of this project, unfortunately. It originally was built along a Twitter cli

Dec 13, 2022

chaos-platform

chaos-platform

Chaosblade-box: An chaos engineering platform with rich scenes Introduction Chaosblade-box is an chaos engineering platform with rich scenes, the scen

Dec 22, 2022

A cross-platform interface for FutureRestore, written in Java with Swing

A cross-platform interface for FutureRestore, written in Java with Swing

Futurerestore GUI A GUI implementation for FutureRestore written in Java. Installation Download from releases. No Java download required (it's bundled

Dec 30, 2022

Dashjoin Platform

Dashjoin Platform

Dashjoin Open Source & Cloud Native Low Code Development Platform For anyone who is planning a development project, faces a tight schedule, needs to p

Dec 21, 2022
Owner
EdgeGallery
EdgeGallery: Open Multi-Access Edge Computing Platform
EdgeGallery
The backend service for developer module of EdgeGallery platform

Developer-be 开发者平台 开发者平台是为App开发者提供开发工具/测试环境/上线部署的平台,分为前后台两个部分,developer-be是后台部分,提供接口调用,developer-fe是前台部分,提供界面展示。有关开发者平台的架构的详细介绍请访问我们的wiki社区 特性介绍 为了方便开

EdgeGallery 24 Jan 11, 2022
A sub module of EdgeGallery MECM which responsible for the app package management.

mecm-apm Description Application package manager responsible for application package management including Onboarding, distributing package to edge etc

EdgeGallery 21 Jan 10, 2022
A backend service for EdgeGallery application testing and verification

ATP-BE ATP (Application test platform)是应用测试认证的平台,通过构建统一的测试标准并搭建测试框架,为开发者平台与APPStore提供一致的APP测试体验 特性介绍 上传、管理App 编译运行 atp-be对外提供restful接口,基于开源的ServiceCom

EdgeGallery 20 Jan 10, 2022
A sub module of EdgeGallery MECM which responsible for inventory.

mecm-inventory Description MECM-Inventory modules provides common inventory of all system and host level resources of MEC system. Compile and build Th

EdgeGallery 23 Dec 29, 2021
A sub module of EdgeGallery MECM which responsible for the app orchestration.

mecm-appo Description Application orchestrator is the core module responsible for orchestrating life cycle maintenance operation of application. Compi

EdgeGallery 25 Dec 25, 2021
To quickly integrate your applications into the EdgeGallery platform, we provide the toolchain project to help developers quickly modify code and migrate applications to the platform.

Toolchain 工具链 工具链是MEC Developer开发者平台中的一个重要特性,当x86平台的App想要上车ARM平台时,底层的代码不可避免的需要进行修改或重写。 App提供者可以通过MEC Developer开发者平台中集成的工具链进行源代码分析,定位需要修改的源代码并根据指导意见进行修

EdgeGallery 19 Jan 7, 2022
In the Developer - Platform of EdgeGallery, we have provided a lot of useful APIs, in this project, try to simulates APIs of the competence center to help develoers test API request and response online.

api-emulator api-emulator模块,为EdgeGallery提供了基本能力的模拟api,开发者可以调用该模拟器提供的api,不需要真实部署就可以查看平台已有的能力。目前该api-emulator集成了两种平台能力:位置服务和人脸识别能力。 平台能力简介 位置服务 提供用户位置,E

EdgeGallery 21 Dec 25, 2021
EdgeGallery test platform

edgeT Edge Gallery Test Platform Introduction A micro-services to manage, execute, run test cases (developed in different run-time like java, python,

EdgeGallery 23 Sep 14, 2021
A core java-based desktop application that can secretly track users' activities, record screenshots and keys typed by the user

@Abhishek Tandon @Manoj Kumar Dewangan @Ritesh Barik Introduction This project is a core java-based desktop application that can secretly track users'

Vaibhav Biturwar 0 Apr 2, 2022