java-manta-test-harness is a community-maintained Java testing app used for verifying Java 11 support by java-manta client SDK for manta.
Installation
Java 11 is required. The main client module can be installed by adding the following dependency using Maven 3.5.x:
Using Maven
Add the latest java-manta-client-unshaded dependency to your Maven pom.xml.
<dependency>
<groupId>com.joyent.manta</groupId>
<artifactId>java-manta-client-unshaded</artifactId>
<version>LATEST</version>
</dependency>
Consult Maven Central search for a list of all available versions and dependency strings for other project types.
Note: Users are expected to use the same version across sub-packages, e.g. using
com.joyent.manta:java-manta-client-unshaded:3.0.0 with
com.joyent.manta:java-http-signature:4.0.10 is not supported.
It's important to note that a separate artifact published as java-manta-client can optionally be used in place of
java-manta-client-unshaded if users want less control over dependency resolution.
From Source
If you prefer to build from source, you'll also need Maven, and then invoke:
If you want to skip running of the test suite use the -DskipITs property, e.g. mvn clean install -DskipITs.
Configuration
Configuration can be done through system properties or environment variables. Listed below are the most commonly used configuration options:
| System Property | Environment Variable | Default |
|---|---|---|
| manta.url | MANTA_URL | https://us-east.manta.joyent.com:443 |
| manta.user | MANTA_USER | |
| manta.key_id | MANTA_KEY_ID | |
| manta.key_path | MANTA_KEY_PATH | $HOME/.ssh/id_rsa (if exists) |
| manta.key_content | MANTA_KEY_CONTENT |
manta.url( MANTA_URL ) The URL of the manta service endpoint to test againstmanta.user( MANTA_USER ) The account name used to access the manta service. If accessing via a subuser, you will specify the account name as "user/subuser".manta.key_id: ( MANTA_KEY_ID) The fingerprint for the public key used to access the manta service. Can be obtained usingssh-keygen -l -f ${MANTA_KEY_PATH} -E md5 | cut -d' ' -f 2manta.key_path( MANTA_KEY_PATH) The name of the file that will be loaded for the account used to access the manta service.manta.key_content( MANTA_KEY_CONTENT) The content of the private key as a string. This is an alternative tomanta.key_path. Bothmanta.key_pathand can't be specified at the same timemanta.key_content. This parameter can be specified independently since 3.4.1.
Client-side Encryption
In order to enable client side encryption for downloading and decrypting encrypted files, please set the following system properties. Please consult the Configuration Parameters list for the corresponding environment variables.
manta.client_encryption- set totrue
Additionally, you should set the following system properties to support encrypting and uploading files using client-side encryption.
manta.encryption_algorithmmanta.encryption_key_id
For more details see the information available here in the Java-Manta Documentation for Client-Side Encryption
Usage
- Execute a
mvn clean installormvn clean verifyfrom the project's root directory to run all tests. - A second approach will be to formulate a run configuration in the IDE you setup this project with and comprehensively
supply the mandatory configuration parameters like
MANTA_URL, MANTA_USER, MANTA_KEY_ID, MANTA_KEY_PATHorMANTA_KEY_CONTENT.
FAQs
Known edge cases and other topics are covered in Java-Manta FAQ's.
Contributions
Contributions are welcome! Please read the CONTRIBUTING.md document for details on getting started.
Bugs
See https://github.com/joyent/java-manta/issues.
License
Java Manta Test Harness is licensed under the MPLv2. Please see the LICENSE.txt file for more details. The license was changed from the MIT license to the MPLv2 license starting at version 2.3.0.
Credits
We are grateful for the functionality provided by the libraries that this project depends on. Without them, we would be building everything from scratch. A thank you goes out to: