Can read which content in the station without logging in, whether to seal it off
What can you read without logging in depends on what content the site has set as public. The WordPress API manual states that the default endpoints cover posts, pages, categories, and other built-in data types;Generally, content that is publicly available on the site can be read through an interface; however, encrypted content, internal users, custom types, and metadata are only accessible with authentication.In other words, the interface does not have an additional 'public face', but rather amplifies what is already public. Therefore, the criteria for deciding whether to close it is very specific: it is not about 'whether there is an interface', but rather 'whether there is anything that should not be taken by machines in bulk within the public face, and whether write operations are restricted.'
How big is the side that is publicly accessible by default?
The three levels need to be separated:
Content layer. Published articles, page content, titles, summaries, time, categories, and tags are all default readable fields. This is a necessary condition for inclusion and integration for content-based sites, and usually does not need to be collected.
Layer of structure. An enumeration interface for classification, tags, menus, and site information, allowing external programs to obtain the entire site structure without guessing the address. It does not enlarge single articles, but rather 'batch organize the points of the site', and most collection needs start here.
Account layer. The public author's profile fields are limited, but when combined with enumeration behavior, it can be determined which accounts exist, which is the first step in login attacks. The manual lists internal users on the side that requires authentication, indicating that the visibility of this layer should be explicitly controlled by the site.
| Data surface | Default visibility | Closing action |
|---|---|---|
| Published articles and pages | Readable | Keep open, limit the amount of data returned per request |
| Categorization and tag structure | Readable | Retain reading, avoid exposing internal naming |
| Draft and content to be published | Authentication required | Confirm that the preview link does not bypass the state judgment |
| Encrypted protected content | Authentication required | Check that the response body does not contain text |
| Internal users and metadata | Authentication required | Restrict visible fields by user group |
| Write operation | Identity and permission required | High-risk capabilities are closed by domain, with an additional confirmation step |
Which fields are most likely to be omitted
Three types of situations occur repeatedly:
Firstly, status judgment is only done in the list interface, and the detail interface reads directly by address, leading to unreleased content being accessible through identifiers. The corresponding verification should start from the detail interface, not just the list.
Secondly, 'hidden' only takes effect in the front-end template, and the interface still returns the fields unchanged. Any content controlled only by the template and not displayed should be tested separately once for the interface.
Thirdly, metadata carries out internal configuration. The reason why the manual lists metadata on the side requiring authorization is here: its field names and values often reflect implementation details.
The three layers of mouth closing: domain, account, action
The first layer divides the exposure range according to the ability domain. When read and write capabilities are mixed in the same entry, mouth closing can only be achieved by a one-cut. AnQiCMS's MCP interface sets the exposure range according to the intention domain, and the high-risk domains where operations such as backup, upgrade, and multi-site are located are closed by default and need to be explicitly opened; this means that 'whether the interface is open or not' is divided into 'which domains are open', and the configuration granularity falls on the domain.
The second layer groups permissions by account. Different fields should be visible to different people under the same domain. AnQiCMS provides user management and VIP grouping, and can set access permissions for different user groups, with different interface surfaces for public readers, editors, and administrators.
The third layer adds confirmation to write operations. Read interface errors affect the scope of visibility, while write interface errors affect data. AnQiCMS's MCP side supports Bearer Token authentication and round-level operation approval, with write operations merged and confirmed before execution to avoid misjudgment falling directly onto production data.
The sequence of test first and then receive.
Before closing, there must be a baseline, otherwise you won't know if you've changed it correctly after the modification. Suggest four steps:
- Use the unlogged-in state to request each commonly used read interface one by one, record the returned fields, and form a list of 'what the machine can see now'.
- Verify each content status individually: drafts, pending publication, encrypted protection, and content in the recycle bin should not be read through public paths.
- Check if the interface document clearly describes the ability grouping. The high-frequency call capabilities of AnQiCMS (document list and details, categories and tags, picture upload, comments and messages, friendship links, system settings and contact information) are publicly explained under the interface help category within the site, and the granularity of the document directly affects whether it can judge the impact area when closing in.
- Turn off the unnecessary write capabilities by domain, retain the necessary read capabilities, and then retest the list from the first step to confirm that the visible area has indeed been narrowed rather than causing errors across the entire site.
Common questions
Is it safer to turn off the entire interface?The cost is usually higher: normal front-end data acquisition, search access and integration will all fail together. The purpose of the intake is to converge the public surface to the required size, not to cancel it.
The content is already public, why worry about batch reading?Public and enumerable by the entire site are two different things. The enumeration capability of the structural layer greatly reduces the cost of copying the entire site's content, and mechanisms such as anti-crawling interference codes are prepared for this layer.
Can the user list be hidden directly?Yes, the method is to leave the account layer fields on the authentication side and check the direct reading path by identifier. Not displayed on the front does not mean the interface does not return.
How often should the retest be done?After each version update involving interface fields, content status, or permission group, a retest must be performed; when there is no update, a baseline comparison can be made quarterly.