Class AdminQueryManager
java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
org.gcube.informationsystem.resourceregistry.rest.admin.AdminQueryManager
Global Privileged raw-query diagnostics.
Segregated under /admin so that API Gateway / WAF network policies can
restrict this surface independently of the standard endpoints. Authorization and
orchestration logic is not duplicated here: this controller delegates to the same
InstancesPolicyEnforcementPoint used by
InstancesManager,
exposing an admin-only method/policy on it instead of a separate PEP class.
Manual diagnostic use only. This endpoint must never be invoked programmatically and must never be exposed through any client library: the underlying persistence engine is expected to change (see the PostgreSQL migration roadmap), and no compatibility guarantee is offered for the raw query surface or its syntax.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant representing the method name for executing raw queries, used for accounting. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
buildResponse, buildResponse, setAccountingMethod, setAccountingMethod
-
Field Details
-
RAW_QUERY_METHOD
Constant representing the method name for executing raw queries, used for accounting.- See Also:
-
-
Constructor Details
-
AdminQueryManager
public AdminQueryManager()Creates a newAdminQueryManagerREST resource.
-
-
Method Details
-
rawQuery
@Path("raw-query") @Consumes("application/json") @Produces("application/json") public String rawQuery(String requestBody) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException Executes a read-only backend query within the token Context or its requested subtree.- Parameters:
requestBody- the JSON request body containing the query text- Returns:
- the serialized query result
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException- if the query syntax or request payload is invalidorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if a registry database error occurs
-