NationalSecurityAgency/datawave-accumulo-service

Java

6

183 commits

updated Feb 20, 2025

See the code

README

Accumulo Service

Apache License Build Status

The Accumulo service is an administrator utility that provides a rest API which exposes a small subset of Accumulo's table and security operations to external clients. Users must possess the Administrator role to access the service's endpoints.

Root Context

https://host:port/accumulo/v1/


Admin API

MethodOperationDescriptionRequest Body
POSTadmin/createTable/{tableName}Creates the given tableN/A
POSTadmin/flushTable/{tableName}Initiates minor compaction on the given tableN/A
POSTadmin/grantSystemPermission/{userName}/{permission}Grants user the specified system permissionN/A
POSTadmin/revokeSystemPermission/{userName}/{permission}Revokes system permission from userN/A
POSTadmin/grantTablePermission/{userName}/{tableName}/{permission}Grants user the specified table permissionN/A
POSTadmin/revokeTablePermission/{userName}/{tableName}/{permission}Revokes table permission from userN/A
POSTadmin/setTableProperty/{tableName}/{propertyName}/{propertyValue}Sets the specified table propertyN/A
POSTadmin/removeTableProperty/{tableName}/{propertyName}Removes the specified table propertyN/A
GETadmin/listTablesLists all Accumulo tablesN/A
GETadmin/listUsersLists all Accumulo usersN/A
GETadmin/listUserAuthorizations/{userName}Lists the user's authorizationsN/A
GETadmin/listUserPermissions/{userName}Lists the user's permissionsN/A
PUTadmin/updateProcesses the specified table mutationsUpdateRequest
POSTadmin/validateVisibilitiesValidates one or more visibility expressionsvisibility form param

Lookup API

Enables simple batch scans on a given table/row to retrieve results, and also supports query auditing (i.e., when audit-client.enabled: true, which is the default)

MethodOperationDescriptionRequest Body
GET/POSTlookup/{tableName}/{row}Scans the given row and returns scan resultsOptional form params
  • Several optional parameters can be expressed via query string (GET) or form param (POST)

  • See LookupController class for details

Stats API

May be used as a proxy for the Accumulo Monitor as a convenience, in order to expose the monitor's raw stats response to external clients

MethodOperationDescriptionRequest Body
GETstatsRetrieves the raw stats response from the Accumulo MonitorN/A

Getting Started

  1. First, refer to services/README for launching the config, authorization, and audit services.

    • The authorization service should be launched with the mock profile to leverage test PKI materials and associated user configuration (see authorization-mock.yml).
  2. Launch this service as follows, with the remoteauth profile to enable client cert authentication, and with the mock profile to utilize an in-memory Accumulo instance containing some test data...

    java -jar service/target/accumulo-service*-exec.jar --spring.profiles.active=dev,remoteauth,mock
    
  3. Ensure that the testUser.p12 (password: ChangeIt) cert is imported into your browser, and then visit any of the following:

    Note: The stats API is not functional when using the mock profile, as it requires that ZooKeeper and Accumulo Monitor instances are running

    See sample_configuration/accumulo-dev.yml and configure as desired

hacktoberfest

NationalSecurityAgency/datawave-accumulo-service

Java

6

183 commits

updated Feb 20, 2025

See the code

README

Accumulo Service

Apache License Build Status

The Accumulo service is an administrator utility that provides a rest API which exposes a small subset of Accumulo's table and security operations to external clients. Users must possess the Administrator role to access the service's endpoints.

Root Context

https://host:port/accumulo/v1/


Admin API

MethodOperationDescriptionRequest Body
POSTadmin/createTable/{tableName}Creates the given tableN/A
POSTadmin/flushTable/{tableName}Initiates minor compaction on the given tableN/A
POSTadmin/grantSystemPermission/{userName}/{permission}Grants user the specified system permissionN/A
POSTadmin/revokeSystemPermission/{userName}/{permission}Revokes system permission from userN/A
POSTadmin/grantTablePermission/{userName}/{tableName}/{permission}Grants user the specified table permissionN/A
POSTadmin/revokeTablePermission/{userName}/{tableName}/{permission}Revokes table permission from userN/A
POSTadmin/setTableProperty/{tableName}/{propertyName}/{propertyValue}Sets the specified table propertyN/A
POSTadmin/removeTableProperty/{tableName}/{propertyName}Removes the specified table propertyN/A
GETadmin/listTablesLists all Accumulo tablesN/A
GETadmin/listUsersLists all Accumulo usersN/A
GETadmin/listUserAuthorizations/{userName}Lists the user's authorizationsN/A
GETadmin/listUserPermissions/{userName}Lists the user's permissionsN/A
PUTadmin/updateProcesses the specified table mutationsUpdateRequest
POSTadmin/validateVisibilitiesValidates one or more visibility expressionsvisibility form param

Lookup API

Enables simple batch scans on a given table/row to retrieve results, and also supports query auditing (i.e., when audit-client.enabled: true, which is the default)

MethodOperationDescriptionRequest Body
GET/POSTlookup/{tableName}/{row}Scans the given row and returns scan resultsOptional form params
  • Several optional parameters can be expressed via query string (GET) or form param (POST)

  • See LookupController class for details

Stats API

May be used as a proxy for the Accumulo Monitor as a convenience, in order to expose the monitor's raw stats response to external clients

MethodOperationDescriptionRequest Body
GETstatsRetrieves the raw stats response from the Accumulo MonitorN/A

Getting Started

  1. First, refer to services/README for launching the config, authorization, and audit services.

    • The authorization service should be launched with the mock profile to leverage test PKI materials and associated user configuration (see authorization-mock.yml).
  2. Launch this service as follows, with the remoteauth profile to enable client cert authentication, and with the mock profile to utilize an in-memory Accumulo instance containing some test data...

    java -jar service/target/accumulo-service*-exec.jar --spring.profiles.active=dev,remoteauth,mock
    
  3. Ensure that the testUser.p12 (password: ChangeIt) cert is imported into your browser, and then visit any of the following:

    Note: The stats API is not functional when using the mock profile, as it requires that ZooKeeper and Accumulo Monitor instances are running

    See sample_configuration/accumulo-dev.yml and configure as desired

hacktoberfest