Salta ai contenuti

Questa pagina non è ancora tradotta in italiano: quello che segue è il testo inglese.

Frequently Asked Questions

Questi contenuti non sono ancora disponibili nella tua lingua.

Since this API is used to access Properties files, and we implement mapping interfaces to deal with those, somehow interfaces are owners for the properties. So here comes the name OWNER, all uppercase because when you speak about it you must shout it out :-)

The true story, is that I tried to find a decent name for the project, but I didn’t come out with anything better. Sorry.

The codebase is very compact, and I try to keep the test coverage to 100%, developing many tests for each new feature. You have the source, you can help improving the library and fix the bugs if you find some.

Still, OWNER API is a very early project, and APIs may change in the future to add/change some behaviors. But the philosophy is to keep always backward compatibility (unless not possible).

What happens if some property is not set to any value?

Section titled “What happens if some property is not set to any value?”

See: Undefined properties in Basic usage chapter. If a property is required and has no sensible default, you can annotate it with @Mandatory to fail fast with a meaningful exception: see Mandatory properties.

How about the security of storing password in properties? Does OWNER support encryptable properties like in Jasypt ?

Section titled “How about the security of storing password in properties? Does OWNER support encryptable properties like in Jasypt ?”

Yes, and since 2.0.0 with a cipher we actually ship — which is the part Jasypt has and we used not to.

db.password = ${$aes-gcm::AAM0UBtPtHU9kZcgvqX673gZTlmMpp4RxRWoHOoDUGjJ...}
jdbc.url = jdbc:h2:mem:test?password=${db.password}
ConfigFactory.registerValueHandler(new AesGcmHandler(passphrase));

AES-256/GCM over PBKDF2 at 210,000 iterations, in the core jar, with no dependency and no framework; the tool that produces the marker is in the same jar. Jasypt derives at 1,000 iterations and encrypts with CBC, which has no integrity check, and needs Spring for the property-source integration. There is also ${$rsa-oaep::...}, a key pair, so that whoever adds a secret to the file cannot read the ones already there — which Jasypt cannot do at all, being a passphrase by construction.

See the Crypto support chapter, and ValueHandlerExample for a runnable one covering both ciphers and a handler of your own.

The older @EncryptedValue and @DecryptorClass annotations, from 1.0.10, still work and are not going anywhere — you supply the Decryptor there (this was tracked in #49). Before 1.0.10 the API was already flexible enough to do it by hand: an example is here.

Why OWNER API doesn’t implement this ${pretty.neat.feature} ?

Section titled “Why OWNER API doesn’t implement this ${pretty.neat.feature} ?”

Explain it on GitHub issues. If I like the idea I will implement it. Or, you can implement by yourself and send me a push request on GitHub. See also Contributing.

The idea is to keep things minimal and code clean and easy. And for every new feature, having a complete test suite to verify all cases.

I have no idea. I implemented OWNER for a web application I was working on, then I decided to share it. And it looks like somebody is now using it. Including my friend Bruno who is a great guy and makes me proud of it.

If you like us to know you are using OWNER, drop a comment here. Or maybe you just want to go here and click on “I use this!”.

The fact I am receiving feedback, request for features and changes, mails and questions, makes me think that this library is useful to some people around the world, and this encourages me to work and improve it. So, don’t be shy to introduce yourself.

Project maintained by Matteo Baccan, and the awesome contributors.

Developed with IntelliJ IDEA

Hosted on GitHub