Package org.aeonbits.owner.extras.jndi


package org.aeonbits.owner.extras.jndi
Reading a configuration out of JNDI, which is where an application server keeps what it was told about the application: as a whole context through JndiLoader, or one entry at a time through JndiHandler.

The two answer different questions. A source - @Sources("jndi:comp/env/myconfig") - binds a whole subtree as properties, and merges with the files below it like any other source. A marker in a value - ${$jndi::comp/env/db/password} - takes one entry and leaves the rest of the file alone, which is what a single credential wants.

JndiNames refuses a name that would leave this machine, and it is the reason this package is three classes rather than two. A JNDI name can carry its own scheme and InitialContext honours it, so ldap:// and its relatives are names it will resolve over the network - the shape of Log4Shell, reachable from a configuration file, since a source spec is expanded before it is read and need not be a constant.

  • Classes
    Class
    Description
    Reads a single JNDI entry into a value:
    A loader that reads the properties bound under a JNDI context: