Authorization certificate management and concurrent user restriction system based on Django framework
Through the authorization certificate management and concurrent user restriction system based on the Django framework, the problem that the authorization management system cannot be used normally in a network-free environment in the existing technology is solved, and flexibility is achieved , secure and efficient authorization management and concurrent user control.
Patent Information
- Application Number
- CN202411310202.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-02-18
AI Technical Summary
The existing authorization management system cannot be used normally in environments without network connections or unstable networks, and lacks flexibility and security, making it difficult to effectively control the number of concurrent users, affecting application performance and stability.
The authorization certificate management and concurrent user restriction system based on the Django framework, creates authorization files with embedded expiration time and concurrent user restriction number by generating RSA key pairs and digital signatures, and the client application verifies the validity of the authorization file at startup. And implement concurrent access control based on the limited number.
It realizes verification of the authenticity and validity of authorization files without network connection, provides flexible authorization management, enhances security, effectively controls the number of concurrent users, protects server resources, and simplifies authorization management and maintenance.
Smart Images

Figure CN119475277A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of concurrent authorization certificate management technology, in particular to an authorization certificate management and concurrent user restriction system based on a Django framework. Background Art
[0002] Software authorization management: With the widespread application of software products, ensuring the legal use of software has become particularly important. Authorization management mechanisms can prevent unauthorized software use and protect the intellectual property rights of software developers. However, existing authorization management methods often rely on online verification, which limits the use of software in environments without network connection or unstable network.
[0003] Concurrent user control: In Web applications, server resources are limited. Too many concurrent users may cause server overload, affecting application performance and user experience. Therefore, controlling the number of concurrent users is the key to maintaining application stability and performance. Online authorization verification system: Many existing software authorization systems rely on online servers for authorization verification. When a user starts the software, the software sends a request to the server to verify the validity of the authorization certificate. The disadvantage of this method is that the software cannot be used normally without a network connection. Fixed authorization file: Some systems use a fixed authorization file, which contains authorization information but does not contain expiration time and concurrent user restrictions. The disadvantage of this method is that the authorization cannot be managed dynamically and is susceptible to tampering. Some solutions control software authorization through hardware tokens (such as USB keys). Although this method provides security to a certain extent, it is not convenient for managing the number of concurrent users, and the loss or damage of the hardware token may cause the authorization to fail.
[0004] Offline authorization verification: Although some systems may use digital signatures to ensure the authenticity of authorization files, they usually still need to verify the validity of the authorization online rather than operating completely offline; Concurrent user limit: Existing authorization systems rarely embed concurrent user limits in authorization files, which means that they cannot effectively control concurrent users and thus protect server resources; Security and integrity protection: Although digital signatures are used to verify the authenticity and integrity of files, existing systems may not be optimized for offline environments, making it impossible to ensure the security of authorization files when there is no network connection; Flexibility and convenience: Existing solutions often lack the flexibility to be used in a variety of network environments (especially offline environments).
[0005] Reliance on online verification: Most existing authorization management systems require an online connection to an authorization server for verification, which limits the use of the software when the network is unstable or unavailable; Lack of flexibility: Fixed authorization files or hardware tokens cannot adapt to changing authorization requirements, such as adjustment of authorization periods or dynamic control of the number of concurrent users; Insufficient security: Online verification systems cannot guarantee the authenticity and integrity of authorization files in an offline state and are vulnerable to tampering and forgery; Difficulty in controlling concurrent users: Existing technologies often do not have an effective mechanism to limit the number of concurrent users, which may result in excessive use of server resources and affect application performance and stability; Inconvenient to manage: For software developers, existing authorization management methods may be difficult to implement and maintain, especially when large-scale distribution of authorizations is required.
[0006] Therefore, it is urgent to improve this shortcoming. The present invention studies and improves the existing technology and its shortcomings, and provides an authorization certificate management and concurrent user restriction system based on the Django framework. Summary of the invention
[0007] The purpose of the present invention is to provide an authorization certificate management and concurrent user restriction system based on the Django framework to solve the problems raised in the above background technology.
[0008] To achieve the above object, the present invention provides the following technical solution: an authorization certificate management and concurrent user restriction system based on the Django framework, comprising the following steps:
[0009] Key generation module:
[0010] Key generation: Use the cryptography library to generate an RSA key pair, including a private key and a public key. The private key is used to sign the authorization file, and the public key is used to verify the signature of the authorization file.
[0011] Key storage: Private keys must be securely stored on the server side, while public keys can be distributed to client applications;
[0012] Authorization file generation module:
[0013] Data structure: The authorization file uses JSON format and contains the following information:
[0014] Expiration time: the expiration date and time of the authorization document;
[0015] Concurrent user limit: the maximum number of users allowed to use the system at the same time;
[0016] Signature generation: Use the private key to digitally sign the JSON string of the authorization file to ensure the integrity and authenticity of the file content;
[0017] File packaging: append the signature to the authorization file and package it into a distributable format;
[0018] Verification Module:
[0019] Signature verification: The client application uses the public key to verify the digital signature of the authorization file to ensure that the file has not been tampered with during the distribution process;
[0020] Expiration time check: The verification module checks the expiration time of the authorization file to ensure that the authorization file is within the validity period;
[0021] Concurrent user limit: The client application implements concurrent access control based on the number of concurrent users in the authorization file. This can be achieved by maintaining a counter or using other mechanisms.
[0022] Client Application Integration:
[0023] Integrated verification logic: The client application loads the authorization file at startup and verifies its validity using the public key;
[0024] Concurrency control implementation: The application implements logic to track the number of concurrent users and reject additional user requests when the limit is reached;
[0025] Offline working mode: The application can work normally without network connection, relying on local verification of authorization files.
[0026] Furthermore, the server implements: generating key pairs, creating and signing authorization files, and securely distributing public keys and authorization files to clients.
[0027] Furthermore, the client implements: integrating the authentication module, implementing concurrent user control logic, and loading and verifying the authorization file when the application starts.
[0028] Furthermore, the storage medium is a token storing encrypted keys and authorization data, and the data is encrypted using symmetric encryption or asymmetric encryption.
[0029] Furthermore, token reading: the software integrates the token reading function to read the encrypted data on the token.
[0030] Further, data decryption: the software uses a pre-shared key or a key authenticated by the token to decrypt the data on the token.
[0031] Further, authorization verification: the software verifies whether the decrypted data is valid to determine whether the user has the right to use the software.
[0032] The present invention provides an authorization certificate management and concurrent user restriction system based on the Django framework, which has the following beneficial effects:
[0033] Offline authorization verification: Provides a method to verify the authenticity and validity of the authorization file even without a network connection, ensuring that the software can be used legally in an offline environment;
[0034] Flexible authorization management: By embedding expiration time and concurrent user limit in the authorization file, authorization management is more flexible and can adapt to different usage scenarios and needs;
[0035] Enhanced security: Use digital signature technology to protect authorized documents, ensure their integrity and authenticity during distribution and use, and prevent unauthorized use and tampering;
[0036] Effectively control concurrent users: embed the number of concurrent users in the authorization file, allowing client applications to control concurrent access based on this limit and protect server resources from excessive use;
[0037] Easy to implement and maintain: Provides an easy-to-implement and maintain authorization management mechanism, allowing software developers to manage and distribute software authorizations more effectively. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of the authorization certificate management and concurrent user restriction system based on the Django framework of the present invention; DETAILED DESCRIPTION
[0039] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0040] like Figure 1 As shown in the figure, the authorization certificate management and concurrent user restriction system based on the Django framework includes the following steps:
[0041] Key generation module:
[0042] Key generation: Use the cryptography library to generate an RSA key pair, including a private key and a public key. The private key is used to sign the authorization file, and the public key is used to verify the signature of the authorization file.
[0043] Key storage: Private keys must be securely stored on the server side, while public keys can be distributed to client applications;
[0044] Authorization file generation module:
[0045] Data structure: The authorization file uses JSON format and contains the following information:
[0046] Expiration time: the expiration date and time of the authorization document;
[0047] Concurrent user limit: the maximum number of users allowed to use the system at the same time;
[0048] Signature generation: Use the private key to digitally sign the JSON string of the authorization file to ensure the integrity and authenticity of the file content;
[0049] File packaging: append the signature to the authorization file and package it into a distributable format;
[0050] Verification Module:
[0051] Signature verification: The client application uses the public key to verify the digital signature of the authorization file to ensure that the file has not been tampered with during the distribution process;
[0052] Expiration time check: The verification module checks the expiration time of the authorization file to ensure that the authorization file is within the validity period;
[0053] Concurrent user limit: The client application implements concurrent access control based on the number of concurrent users in the authorization file. This can be achieved by maintaining a counter or using other mechanisms.
[0054] Client Application Integration:
[0055] Integrated verification logic: The client application loads the authorization file at startup and verifies its validity using the public key;
[0056] Concurrency control implementation: The application implements logic to track the number of concurrent users and reject additional user requests when the limit is reached;
[0057] Offline working mode: The application can work normally without network connection, relying on local verification of authorization files.
[0058] Server implementation: Generate key pairs, create and sign authorization files, and securely distribute public keys and authorization files to clients.
[0059] Client implementation: Integrate the authentication module, implement concurrent user control logic, and load and verify the authorization file when the application starts.
[0060] Storage medium: The token stores encrypted keys and authorization data, which can be encrypted symmetrically or asymmetrically. The token should have physical security features, such as anti-tampering and anti-copying.
[0061] Token reading: The software integrates the token reading function and can read the encrypted data on the token.
[0062] Data Decryption: The software decrypts the data on the token using a pre-shared key or a key authenticated by the token.
[0063] Authorization verification: The software verifies whether the decrypted data is valid to determine whether the user has the right to use the software.
[0064] Start the software: When the user starts the software, the software reads the data on the token and verifies its validity. If the verification is successful, the user can use the software normally; otherwise, the software denies access, which is highly secure.
[0065] The embodiments of the present invention are given for the purpose of illustration and description, and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.
Claims
1. Authorization certificate management and concurrent user restriction system based on Django framework, characterized by: The following steps are involved: Key generation module: Key generation: Use the cryptography library to generate an RSA key pair, including a private key and a public key. The private key is used to sign the authorization file, and the public key is used to verify the signature of the authorization file. Key storage: Private keys must be securely stored on the server side, while public keys can be distributed to client applications; Authorization file generation module: Data structure: The authorization file uses JSON format and contains the following information: Expiration time: the expiration date and time of the authorization document; Concurrent user limit: the maximum number of users allowed to use the system at the same time; Signature generation: Use the private key to digitally sign the JSON string of the authorization file to ensure the integrity and authenticity of the file content; File packaging: append the signature to the authorization file and package it into a distributable format; Verification Module: Signature verification: The client application uses the public key to verify the digital signature of the authorization file to ensure that the file has not been tampered with during the distribution process; Expiration time check: The verification module checks the expiration time of the authorization file to ensure that the authorization file is within the validity period; Concurrent user limit: The client application implements concurrent access control based on the number of concurrent users in the authorization file. This can be achieved by maintaining a counter or using other mechanisms. Client Application Integration: Integrated verification logic: The client application loads the authorization file at startup and verifies its validity using the public key; Concurrency control implementation: The application implements logic to track the number of concurrent users and reject additional user requests when the limit is reached; Offline working mode: The application can work normally without network connection, relying on local verification of authorization files.
2. According to the Django framework-based authorization certificate management and concurrent user restriction system of claim 1, it is characterized in that: Server implementation: Generate key pairs, create and sign authorization files, and securely distribute public keys and authorization files to clients.
3. According to the Django framework-based authorization certificate management and concurrent user restriction system of claim 1, it is characterized in that: Client implementation: Integrate the authentication module, implement concurrent user control logic, and load and verify the authorization file when the application starts.
4. According to the Django framework-based authorization certificate management and concurrent user restriction system of claim 1, it is characterized in that: The storage medium is the encrypted key and authorization data stored in the token, and the data is encrypted using symmetric encryption or asymmetric encryption.
5. The authorization certificate management and concurrent user restriction system based on the Django framework according to claim 1 is characterized in that: Token reading: The software integrates the token reading function to read the encrypted data on the token.
6. The authorization certificate management and concurrent user restriction system based on the Django framework according to claim 1 is characterized in that: Data Decryption: The software decrypts the data on the token using a pre-shared key or a key authenticated by the token.
7. The authorization certificate management and concurrent user restriction system based on the Django framework according to claim 1 is characterized in that: Authorization verification: The software verifies whether the decrypted data is valid to determine whether the user has the right to use the software.