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


Manual Reference Pages  -  OPENXPKI::CONFIG (3)

.ds Aq ’

NAME

OpenXPKI::Config - Connector based configuration layer using Config::Versioned

CONTENTS

SYNOPSIS



 use OpenXPKI::Config;

 my $cfg = OpenXPKI::Config->new();

 print "Param1=", $cfg->get(subsystem1.group1.param1), "\n";



DESCRIPTION

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 <B>systemB> 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.

Methods

    update_head

The commit id of the head is determined at startup. Changes to the config repository during runtime are not visible to the connector. This method updates the internal head pointer to the current head of the underlying repository.

Returns true if the head has changed, false otherwise.

    get_version

Return the sha1 value of the current head of the config tree. This is the version which is used, when you dont pass a version or when you query a value in the system namespace.

    get_head_version

Return the sha1 value of the latest commit of the config tree.

    walkQueryPoints

Shortcut method to test multiple resolvers for a value.

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



    get_inherit

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

The query



    $conn->get_inherit(token.ca-one-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/ssl/default.pem


    ca-one-signer:
      inherit: default
      key: key: /usr/local/etc/openxpki/ssl/mykey.pem



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


perl v5.20.3 OPENXPKI::CONFIG (3) 2016-04-03

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