Authority control method and system under micro-service architecture, and access token

An access token and permission control technology, applied in the field of microservices, can solve problems such as low efficiency, achieve the effect of reducing time cost, improving overall efficiency, and reducing request processing delay

Active Publication Date: 2020-04-17
POWERCHINA HUADONG ENG COPORATION LTD +1
View PDF3 Cites 22 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
  • Authority control method and system under micro-service architecture, and access token
  • Authority control method and system under micro-service architecture, and access token
  • Authority control method and system under micro-service architecture, and access token

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0066] like 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 pieces of token fragments, ...

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 invention relates to a permission control method and system under a micro-service architecture, and an access token, and aims to solve the problem of low efficiency caused by frequent request of authentication service by each resource service and frequent query of a database by the authentication service to obtain current user permission information in the micro-service architecture. Accordingto the technical scheme, the method comprises the steps that a client obtains an access token which is returned by an authentication server and contains an authority bit stream, wherein the authoritybit stream is a binary string with a fixed bit number, the bit number of the binary string is determined according to the number of system authorities, each bit in the binary string is in one-to-onecorrespondence with the authority in the system, and the value of each bit represents the state of the corresponding authority; a client carries the access token to send a resource request to the APIgateway; an API gateway carries out security authentication on the access token and forwards the resource request to the corresponding micro-service after the authentication is passed, and the accesstoken is carried during forwarding; and a micro-service verifies the permission according to the value of the bit 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 Applications(China)
IPC IPC(8): H04L9/32H04L29/06
CPCH04L9/3213H04L63/0807H04L9/3247
Inventor 陈敏王国光杨晨张成涛杨阳柳晓阳远建平
Owner POWERCHINA HUADONG ENG COPORATION LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products