Feature preview

Feature Introduction

How often does the backend login status expire, and how should the session duration be balanced?

How often does the background login status expire, essentially weighing two directions: the longer the session, the smoother the operation, but the longer the window of opportunity for stolen credentials to be used. The signature token itself has an expiration semantics, combined with the interface exposure range set according to the intent domain and round-level operation confirmation, can bring the risk of long sessions back to an acceptable range. In a high-risk repair, it is necessary to rotate the server signature key and change the administrator's password at the same time, changing only one item is equivalent to leaving half a door open.

Session duration Background security

Feature Introduction

How often should the login status of the content management system backend expire, the answer is not a fixed number of minutes, but a balance: the session length determines how long the token can be used after it is stolen, and also determines how often the editor needs to log in every day. Treat it as an experience parameter, and the security window will be pushed to an invisible place.

What carries the login status

The login status on the backend is generally carried by a signed token, rather than by a record of the session table on the server. The nature of tokens like JWT is that they have an expiration semantic: the validity period is written when issued, and the server recognizes it by verifying the signature key. The benefit is that there is no need to maintain session storage on the server, and no changes are needed for horizontal scaling and container deployment; the cost is that the tokens issued cannot be revoked individually before expiration, unless an additional list of invalid tokens is maintained. Therefore, the抓手 for

What is lost by long sessions and short sessions

Session is short, the loss is the operation efficiency: Editing requires re-login after writing an article, automation tasks need to obtain credentials each time they are called, and long processes are easily interrupted. Session is long, the loss is the ability to close: Addresses that appear in screenshots, credentials in scripts, and long-term valid login states in browsers, any leakage can be used for a period of time before being discovered. The criteria can be divided by role: Manual operation accounts with editors have a limited impact on short sessions; interface credentials mainly for program calls are more cost-effective with expiration dates and permission controls.

Why does automated calling prefer long-term credentials

External AI client access to the background, when calling batch task interfaces, the most common request is to configure it for long-term use once. This is reasonable, but it cannot be achieved by extending the login status, but by the capability side: The background MCP interface sets the exposed range for each capability domain according to the intention directory, and high-risk actions at the whole-site level are not open by default; The calling side will make round-level confirmation again, merging a batch of write operations into one confirmation, rather than giving the token all permissions. This way, even if the token is leaked, the usable range is also limited to the domains that have been opened.

How long is the window after the token is stolen

The window length equals the expiration time minus the detection time. It is more effective to handle the two variables separately: the expiration time is a configuration item, and the detection time relies on logs and alarms. The approach given by a high-risk repair on-site is worth referring to - it fixes the issue where list sorting parameters are concatenated into the query statement, as well as the issue that the login credentials used for site switching can be forged. The upgrade suggestions also require the rotation of the server signature key and the change of the administrator's password. The reason is here: changing the password without rotating the signature key still allows old tokens to be valid; rotating the key without changing the password, the entrance credentials themselves are still at risk. Only doing both things together is to close the window.

Why should site switching be viewed separately?

Under multi-site management, a single login may span multiple site identities, and the scope of the credentials is greater than that of a single site. In such scenarios, a more stable approach is to use a one-time ticket to complete the switch, leaving no long-term cross-site identity available after the switch is completed, rather than allowing a long session to carry all site permissions at the same time.

Common questions

Question: Isn't it safer to set the validity period very short?Answer: Yes, just looking at this item is, the cost is that automated tasks and long process editing will be frequently interrupted, and it is necessary to set by role level rather than a one-size-fits-all approach.

Question: Can the signed token be revoked actively?Answer: By default, it cannot be, the signature is verified and recognized. To revoke in advance, an additional invalid list is needed, or the signature key can be rotated directly, the latter has a greater impact.

Question: Why is it required to change the password at the same time when upgrading to a secure version?Answer: Because the leak may occur at two places simultaneously: entrance credentials and server-side signature. Rotating the key closes the tokens that have already been issued, and changing the password blocks the way to log in with old credentials, complementing each other.

Related functions

Preview

Will the preview link of the draft be stolen, how should the preview parameters be closed?

Will the link of a draft or pending publication content with preview parameters be caught by a spider, depending on three things: whether the address can be guessed, whether the crawling rules cover it, and whether the server checks the status when reading the details. The crawling exclusion rules are just suggestions and cannot block the addresses that have already been shared; the real closure should be based on the status check and the preview parameters only taking effect in authorized sessions. After making changes, use the search engine site information to check for missing pages.

Preview

How do the changes made by AI to the template return to the site and take effect

Using AI to modify templates, changes need to be rolled back to the site template file and verified immediately to take effect. There are four types of demand sources within the site: visual template editing, skills, AI Chat, and external clients connected through MCP. The common steps are to describe the requirements, generate or modify code, check the disk, and then verify the homepage and list page; the skill layer covers two types of tasks: template development and API development.

Preview

How can things be shared between multiple brand websites managed by the same backend?

When managing multiple brand websites with a single backend, the boundaries of shared and independent layers are divided into three: the operation layer (deployment instances, listening ports, cache) is usually shared, the structure layer (content model, classification, template) is configured independently per site, and the data layer (documents, attachments, users and permissions) is isolated according to the site's ownership. Shared instances do not mean shared data; to determine whether to split the site or use the content model, consider whether the brand differences affect the structure and data layers.