Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and system for authority control under microservice architecture

A technology of permission control and microservices, applied in the field of microservices, can solve problems such as low efficiency, and achieve the effect of reducing time cost, reducing request processing delay, and simplifying call links

Active Publication Date: 2022-04-19
POWERCHINA HUADONG ENG COPORATION LTD +1
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical problem to be solved by the present invention is to provide a permission control method, system and access token under the microservice architecture to solve the problem of frequent requests for authentication services and frequent authentication services of various resource services in the microservice architecture. Inefficiencies caused by querying the database for current user privilege information

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for authority control under microservice architecture
  • Method and system for authority control under microservice architecture
  • Method and system for authority control under microservice architecture

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0066] Such as figure 1 , figure 2 As shown, this embodiment is a permission control method under the microservice architecture, and the specific steps are as follows:

[0067] S1. The client sends a login request to the authentication server.

[0068] S2. After receiving the login request sent by the client, the authentication server verifies whether the username and password are correct, and if so, generates an access token including the permission bit stream and returns it to the client, otherwise returns an incorrect username or password.

[0069] In this example, the permission bit stream is a binary string with a fixed number of digits. The number of digits in the binary string is determined according to the number of system permissions. Each bit in the binary string corresponds to the permission in the system, and the value of the bit represents the status of the corresponding permission. .

[0070] In this embodiment, the access token has N slices of token slices, ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to a permission control method, system and access token under the microservice architecture, so as to solve the inefficiency caused by the frequent request of each resource service in the microservice architecture and the frequent query of the database by the authentication service to obtain the current user permission information The problem. The technical solution of the present invention is: the client obtains the access token that includes the permission bit stream returned by the authentication server; The bits correspond to the permissions in the system one by one, and the value of the bit represents the state of the corresponding permission; the client sends a resource request to the API gateway with the access token; the API gateway performs security authentication on the access token, and sends the The resource request is forwarded to the corresponding microservice, and the access token is carried when forwarding; the microservice verifies the permission according to the bit value corresponding to the requested resource on the permission bit stream in the access token.

Description

technical field [0001] The invention relates to a permission control method, system and access token under the microservice architecture. Applicable to the field of microservice technology. Background technique [0002] In recent years, the Internet industry has developed rapidly, and the scale of Internet applications has expanded rapidly. At the same time, the number of developers for a single application has also increased greatly. The traditional monolithic architecture has gradually been replaced by the microservice architecture due to reasons such as high coupling, difficulty in maintenance, and rapid deployment. The principle of the microservice architecture is to split the system into multiple services that can be independently developed, designed, operated, and maintained. The services are called through the Application Programming Interface (API). Each service can be deployed independently and They are isolated from each other, and at the same time, different tech...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L9/32H04L9/40
CPCH04L9/3213H04L63/0807H04L9/3247
Inventor 陈敏王国光杨晨张成涛杨阳柳晓阳远建平
Owner POWERCHINA HUADONG ENG COPORATION LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products