Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
OpenXPKI::Config(3)   User Contributed Perl Documentation  OpenXPKI::Config(3)

NAME
       OpenXPKI::Config	- Connector based configuration	layer

SYNOPSIS
	   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");

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

Methods
   update_head,	get_version, get_head_version
       No longer supported

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

   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-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

perl v5.32.0			  2020-08-29		   OpenXPKI::Config(3)

NAME | SYNOPSIS | DESCRIPTION | Methods

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=OpenXPKI::Config&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help