GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Config(3) User Contributed Perl Documentation OpenXPKI::Config(3)

OpenXPKI::Config - Connector based configuration layer

    use OpenXPKI::Config;

    my $cfg = OpenXPKI::Config->new(); # defaults to /usr/local/etc/openxpki/config.d
    print "Param1=", $cfg->get('subsystem1.group1.param1'), "\n";

You can also specify a different directory holding the configuration:

    my $cfg = OpenXPKI::Config->new(config_dir => "/tmp/openxpki");

The new config layer can be seen as a three dimensional system, where the axes are path, version and realm. The path is passed in as parameter to the get_* methods inherited from the parent class Connector::Multi.

Version and realm are automagically set from the session context. The version equals to the commit hash of the Config::Versioned base repository. The realm is prepended to the path.

Therefore,a call to subsystem1.group1.param1 is resolved to the node I18N_OPENXPKI_DEPLOYMENT_MY_REALM_ID.subsystem1.group1.param1.

Exception: The namespace system is a reserved word and is not affected by version/realm mangling. A call to a value below system is always executed on the current head version and the root context.

No longer supported

Print out the checksum of the current backend, might not be available with all backends.

Removed - use Connector::Tee instead

parameters

prefix
The path where the resolver configuration is found.
query
The query string to append to the path
call
The call executed on each resolver node, possible values are all get_* methods which are supported by the used connectors. The default is get.

output

Returns a hash structure holding the result of the first non-empty call and the of the resolver which returned the result

   return { 'VALUE' => $result, 'SOURCE' => $resolver }

To query the same path again, put the resolver name into the path:

   my $value = $conn->get( "$prefix.$resolver.$query" )

configuration

You need to provide the list of resolvers as an ordered list along with the data.

  mydata:
    resolvers:
     - testing
     - repo1
     - repo2

    testing:
       foo: 1234
       bar: 5678

    repo1@: connector:connectors.primary-repo
    repo2@: connector:connectors.fallback-repo

Fetch a single value from a block using inheritance (like the crypto config).

The query

    $conn->get_inherit('token.ca-signer.backend')

will lookup the "inherit" key and use the value to replace the next-to-last path component with it to look up the value again. It will finally return the value found at token.default.backend. The method walks upwards untill it either finds the expected key or it does not find another "inherit". Note: As we can not distinguish an undef value from an unexisiting key, you need to set the empty string to blank an entry.

configuration

  token:
    default:
      backend: OpenXPKI::Crypto::Backend::OpenSSL
      key: /usr/local/etc/openxpki/ca/default.pem


    ca-signer:
      inherit: default
      key: key: /usr/local/etc/openxpki/ca/mykey.pem
2022-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.