In the IPv6 mixed notation the IPv6 part holds at most 96 bits, that is
six 16-bit blocks, because the trailing IPv4 part occupies the remaining
32 bits. IPV6_MIXED_COMPRESSED_REGEX uses a * quantifier after '::', so
the number of blocks was unbounded and addresses longer than 128 bits
were reported as valid.
Keep the regexes unchanged and reject the IPv6 part when it holds more
than six blocks.
Fixes: #15763
Co-authored-by: GerardGao <213731635+GerardGao@users.noreply.github.com>
The PR template checklist and AGENTS.md's PR Convention section were missing
checkstyle:check and spotless:check, unlike the CI pipeline and CONTRIBUTING.md
which already enforce/document them. Bring both in line so contributors are
told to format and check before submitting.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Treat shared Search readiness as a completeness signal so RAD, ARD, generic, and resource-specific client searches immediately return the current snapshot with rate-limited diagnostics.
Assisted-by: Claude Code
Allow public MCP endpoints by default while blocking private and local targets unless an operator-managed IP or CIDR rule permits them. Add a global switch, explicit UI feedback, specifications, unit tests, and OpenAPI coverage.
Assisted-by: Claude Code
* [ISSUE #14804] Add shared AI resource search APIs
Expose generic and resource-specific client search APIs backed by the shared AI Resource Search Core, with auth routing, specifications, and integration coverage.
Assisted-by: Claude Code
* [ISSUE #14804] Cover AI search authorization scenarios
Register the generic resource search and MCP client controllers in the authorization integration-test matrix.
Assisted-by: Claude Code
* [ISSUE #14804] Add Agent artifacts and AgentSpec search indexing
Complete deterministic ARD Agent representations and exact artifact resolution, then integrate the latest online AgentSpec with the shared AI Resource Search index and durable lifecycle maintenance.
Assisted-by: Claude Code
* Fix ARD artifact web isolation test
Update the mocked artifact lookup to match the representation-aware controller contract used by the backend closure.
Assisted-by: Claude Code
Initialize configurable auth plugins with static and default configuration in independent Console deployments, preserve restart-only selection semantics, and cover the real Console Spring context lifecycle.
Assisted-by: Claude Code
* [ISSUE #15718] Escape every LIKE predicate in the embedded role search
The embedded role search appended ESCAPE '\' once, after both LIKE predicates
had been built. ESCAPE qualifies only the predicate it immediately follows, so
the clause applied to the role filter alone and the username filter was left
without one. generateLikeArgument had already rewritten _ into \_, so Derby
matched the backslash literally and the query returned no row whenever both
filters were combined and the username contained an underscore.
Append the clause to each LIKE predicate instead, matching how the user and
permission searches in the same module already build theirs.
Add a Derby test that executes the generated SQL with the bound parameters,
since asserting the SQL text alone cannot prove which predicate the clause
qualifies, and document the rule in the default auth plugin spec.
Assisted-by: Claude Code
Signed-off-by: 吴世元 <wushiyuanwork@outlook.com>
* [ISSUE #15718] Escape the auth name searches like the paged searches
findRolesLikeRoleName and findUserLikeUsername bound "%" + value + "%"
directly, while findRolesLike4Page and findUsersLike4Page routed the same
value through generateLikeArgument. An underscore therefore stayed a
wildcard in the name searches backing the console autocompletion and was a
literal character in the paged searches, so one keyword selected different
rows depending on which control the operator used. Searching ro_le matched
both ro_le and roXle in the dropdown and only ro_le in the table.
Route the argument through generateLikeArgument in all four services. The
embedded SQL already declared ESCAPE '\' on these predicates, so it now
qualifies an argument that actually carries the escape; the external SQL
keeps relying on the backslash that MySQL and PostgreSQL default to, exactly
as its own paged search does.
Extend the Derby test to execute the name search against the real database,
since asserting the bound argument alone cannot prove the underscore stops
matching, and state the parity rule in the default auth plugin spec.
Assisted-by: Claude Code
Signed-off-by: 吴世元 <wushiyuanwork@outlook.com>
---------
Signed-off-by: 吴世元 <wushiyuanwork@outlook.com>
* fix(ai): enforce prompt visibility on reads
Apply visibility query advice to Prompt lists and hide denied single-resource reads as not found. Add focused tests and update API IT coverage documentation.
Assisted-by: Claude Code
* test(ai): isolate prompt visibility context
Clear the thread-local request context around Prompt service tests so visibility query assertions do not inherit identities from unrelated module tests.
Assisted-by: Claude Code
Activate AI Resource Search independently from ARD, add typed predicates and stable numbered pagination, and align built-in datasource indexes with resource-key scanning.
Assisted-by: Claude Code
Extract protocol-neutral index projections and resource type handlers, then route Skill, Prompt, and MCP indexing, backfill, enhancement, and currentness validation through the shared boundary without changing external behavior.
Assisted-by: Claude Code
* [ISSUE #15710] Declare the LIKE escape clause for dialects without a default escape character
Fuzzy search parameters escape the _ wildcard with a backslash, which only
works on a database treating the backslash as the default LIKE escape
character. Derby and Oracle have no such default, so the predicate matches
the backslash literally and silently returns no row.
Report the clause through the new Mapper#getLikeEscapeClause() dialect hook,
override it for Derby and Oracle, and append it to every LIKE bound to such a
parameter, in both the shared mapper defaults and the Oracle overrides. MySQL
and PostgreSQL keep an empty clause, so their SQL is unchanged.
Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
* [ISSUE #15710] Escape the LIKE escape character in fuzzy search arguments
Declaring ESCAPE '\' on the LIKE predicates also constrains the bound
parameter: generateLikeArgument escaped the _ wildcard but left a literal
backslash in the search value untouched, so a value such as C:\path formed
the invalid escape sequence \p. Oracle rejects it with ORA-01424 and Derby
with SQLSTATE 22025, and a value such as a\_b silently kept _ as a wildcard.
Escape the escape character itself before escaping _, keeping the Config and
AI implementations consistent, and document the required order in the
datasource dialect spec.
Add a Derby test that executes the SQL generated by the mapper with the bound
parameter, since asserting the SQL text alone cannot detect an invalid escape
sequence in the argument.
Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
---------
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
Parse legacy resolver request paths and context paths consistently so encoded context paths can be stripped during controller method lookup.
Assisted-by: Claude Code
HistoryConfigInfoMapper#getNextHistoryInfo backs the config history
detail/diff lookup for UPDATE records. It had two defects.
The interface default SQL ends with 'ORDER BY nid LIMIT 1'. LIMIT is
MySQL/PostgreSQL syntax, and HistoryConfigInfoMapperByDerby overrode the
other row-limiting queries but not this one, so Derby inherited it and
the query failed with a syntax error. Derby is the standalone default
datasource. Add the missing Derby override using FETCH FIRST 1 ROWS
ONLY, matching the existing Oracle override.
The gray filter read grayName through getContextParameter, while both
repository implementations publish it with putWhereParameter and
MapperContext keeps those maps separate. 'AND gray_name = ?' was
therefore never emitted and gray history records of one config were not
separated by gray version. Read grayName from the where parameters and
derive both the predicate and its bound parameter from a single guard,
which also removes the isBlank/isEmpty mismatch that could emit a
placeholder without its predicate.
The existing default-mapper test only passed because it wrote grayName
into both maps; it now uses the where parameters alone, as production
does.
Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
* [ISSUE #15660]: Fix NoSuchBeanDefinitionException for ConfigCloneSourceReadPermissionChecker in standalone console
* [ISSUE #15660] Fix NoSuchBeanDefinitionException for ConfigCloneSourceReadPermissionChecker in standalone console
Remove the direct dependency of ConfigProxy on ConfigCloneSourceReadPermissionChecker
and eliminate the redundant permission check, since ConfigCloneService.cloneConfig()
already performs this check server-side.
Also reverts the scanBasePackages addition to NacosConsole which created tight coupling
between console and config server modules.
Assisted-by: Claude Code
Signed-off-by: elnafateh <elnafatehh@gmail.com>
* [ISSUE #15660] Keep clone source read permission check in console proxy via declared bean
---------
Signed-off-by: elnafateh <elnafatehh@gmail.com>
* Fix Skill storage provider routing
Honor the provider persisted with each Skill version for read and delete operations while keeping nacos_config as the legacy fallback.
Assisted-by: Claude Code
* Add global AI storage provider selection
Keep resource-specific provider properties as compatibility overrides and clarify optional storage builder discovery.
Assisted-by: Claude Code
* Keep AI resource storage routing stable
Use each persisted version provider for reads, draft replacements, and deletes, and skip existing Prompt versions before migration writes.
Assisted-by: Claude Code
* test: align AgentSpec concurrent save reflection
Pass the persisted storage provider argument when invoking the concurrent AgentSpec save helper from tests.
Assisted-by: Claude Code
* test: complete Prompt storage descriptor fixture
Include the persisted file list required by the strict storage cleanup path after rebasing the provider routing changes.
Assisted-by: Claude Code
The metadata id of an instance is derived from ip:port:cluster and does not
contain the client id, so the same instance can be re-registered by a different
client. When a Nacos node is restarted, the client reconnects to another node
with a new client id while the stale client is still held by the remaining
nodes. Once that stale client expires, ClientDisconnectEvent marks the instance
metadata expired even though the instance is still registered, and
ExpiredMetadataCleaner deletes it after the expiration window. Operational
metadata such as the console "offline" state is then silently lost.
ExpiredMetadataCleaner now confirms that the instance is no longer registered in
its service before deleting instance metadata, and stops tracking the expired
record when the instance is still registered. The instance is matched by
rebuilding the metadata id from each published instance instead of parsing the
expired metadata id back into ip/port/cluster, so IPv6 addresses containing
colons are handled correctly. Service metadata cleanup is unchanged.
Assisted-by: Claude Code
Signed-off-by: wushiyuanmaimob <wushiyuanwork@outlook.com>
Clean every persisted version storage object before deleting resource metadata, and retain retry descriptors when cleanup fails.
Assisted-by: Claude Code
Use a Jackson 2/3 compatible annotation to preserve Config persistence IDs as JSON strings. Add dual-mapper regression tests, OpenAPI contract assertions, and matching specifications.
Assisted-by: Claude Code
Reuse the active RequestMappingHandlerMapping for authorization method lookup, retain a deprecated legacy fallback, and add auth-enabled integration coverage for module permissions and ambiguous URI forms.
Assisted-by: Claude Code
to match sibling methods (getContentGrayMd5, getGrayRule) and prevent
NPE when groupKey is not in CACHE.
2. ConfigDiskServiceFactory.configDiskService: add `volatile` to fix
the broken double-checked locking idiom (safe publication requires
volatile since Java 5).
Assisted-by: Claude Code
Keep derived resource identity and task comparisons case-sensitive while retaining keyword case folding in query normalization.
Assisted-by: Claude Code
Retry config cache write-lock acquisition consistently with the read path. Route embedded dump events through the existing keyed DumpTask pipeline so retries reload the latest persisted state instead of replaying stale event snapshots.
Assisted-by: Claude Code
Signed-off-by: 付典 <fudianchn@gmail.com>
* Fix ARD filter compatibility
* Remove ARD naming from AI search internals
* Document durable AI resource index enhancement
Assisted-by: Claude Code
* Extend AI resource index task schemas
Assisted-by: Claude Code
* Make AI resource index enhancement durable
Assisted-by: Claude Code
* Fix AI resource index task consumer injection
Assisted-by: Claude Code
* Refactor durable AI resource task model
Generalize the durable search-index task contract with versioned payload and result data while preserving lease, retry, and revision fencing semantics.
Assisted-by: Claude Code
* Update AI resource task schemas
Replace the search-index-specific task table with the generic AI resource task schema across supported databases and align Derby persistence test resources.
Assisted-by: Claude Code
* Use epoch millis for AI resource task scheduling
Assisted-by: Claude Code
* Improve AI resource index convergence
Harden task fencing, lease handling, reconciliation, vector readiness, and ARD filter compatibility.
Assisted-by: Claude Code
* fix: use latest published MCP version by default
Resolve omitted MCP versions through latestPublishedVersion so draft versions do not trigger repeated index reconciliation. Add unit and Admin API regression coverage.
Assisted-by: Claude Code
* fix: fence AI resource task leases
Preserve active leases across coalesced lifecycle schedules and use a monotonic lease token to fence stale workers from renewing, completing, retrying, or releasing newer work.
Assisted-by: Claude Code
* test: align MCP latest published version lookup
Assisted-by: Claude Code
* [ISSUE #14804] Route legacy A2A endpoints to RAD runtime
Keep the legacy endpoint implementation available while routing canonical mode through exact-version RAD runtime publishers.
Assisted-by: Claude Code
* [ISSUE #14804] Stabilize AI subscription integration tests
Wait for the AI SDK connection to become usable before scenarios start, and use bounded waits for asynchronous current-value callbacks.
Assisted-by: Claude Code