Apache-Session-Browseable
view release on metacpan or search on metacpan
with the major components (compiler, kernel, and so on) of the operating system
on which the executable runs, unless that component itself accompanies the
executable.
If distribution of executable or object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the source
code from the same place counts as distribution of the source code, even though
third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses terminated so long
as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the Program
or its derivative works. These actions are prohibited by law if you do not accept
this License. Therefore, by modifying or distributing the Program (or any work
based on the Program), you indicate your acceptance of this License to do so,
lib/Apache/Session/Browseable/LDAP.pm view on Meta::CPAN
ldapServer => 'ldap://localhost:389',
ldapConfBase => 'dmdName=applications,dc=example,dc=com',
ldapBindDN => 'cn=admin,dc=example,dc=com',
ldapBindPassword => 'pass',
Index => 'uid ipAddr',
ldapObjectClass => 'applicationProcess',
ldapAttributeId => 'cn',
ldapAttributeContent => 'description',
ldapAttributeIndex => 'ou',
ldapVerify => 'require',
ldapCAFile => '/etc/ssl/certs/ca-certificates.crt',
ldapTimeout => 10,
};
=head1 DESCRIPTION
This module is an implementation of Apache::Session. It uses an LDAP directory
to store datas.
=head1 COPYRIGHT AND LICENSE
lib/Apache/Session/Browseable/Patroni.pm view on Meta::CPAN
HTTPS connections vulnerable to MITM attacks. Only use in development or
when you have other network-level protections.
PatroniVerifySSL => 0, # INSECURE - disable SSL verification
=item * C<PatroniSSLCAFile>
Path to a custom CA certificate file (PEM format) for verifying the Patroni
API server certificate.
PatroniSSLCAFile => '/etc/ssl/certs/patroni-ca.pem',
=item * C<PatroniSSLCAPath>
Path to a directory containing CA certificates for verification.
PatroniSSLCAPath => '/etc/ssl/certs/',
=back
=head1 SEE ALSO
L<http://lemonldap-ng.org>, L<Apache::Session::Browseable::PgJSON>
=head1 COPYRIGHT AND LICENSE
=encoding utf8
lib/Apache/Session/Browseable/Store/Patroni.pm view on Meta::CPAN
# Circuit breaker active, try cached leader as fallback
return $self->_useCachedLeader( $args, $originalDataSource,
"Circuit breaker active" );
}
require JSON;
require LWP::UserAgent;
require IO::Socket::SSL;
# SSL verification: secure by default, can be disabled with PatroniVerifySSL => 0
my $verify_ssl = $args->{PatroniVerifySSL} // 1;
my %ssl_opts;
if ($verify_ssl) {
%ssl_opts = (
verify_hostname => 1,
SSL_verify_mode => &IO::Socket::SSL::SSL_VERIFY_PEER,
( $args->{PatroniSSLCAFile} ? ( SSL_ca_file => $args->{PatroniSSLCAFile} ) : () ),
( $args->{PatroniSSLCAPath} ? ( SSL_ca_path => $args->{PatroniSSLCAPath} ) : () ),
);
}
else {
%ssl_opts = (
verify_hostname => 0,
SSL_verify_mode => &IO::Socket::SSL::SSL_VERIFY_NONE,
);
}
my $ua = LWP::UserAgent->new(
env_proxy => 1,
ssl_opts => \%ssl_opts,
timeout => $args->{PatroniTimeout} || 3,
);
my $res;
foreach my $patroniUrl ( split /[,\s]\s*/,
( $args->{PatroniUrl} || $args->{patroniUrl} ) )
{
my $resp = $ua->get($patroniUrl);
if ( $resp->is_success ) {
my $c = eval { JSON::from_json( $resp->decoded_content ) };
t/Apache-Session-Browseable-Store-Patroni.t view on Meta::CPAN
Apache::Session::Browseable::Store::Patroni::_buildDataSource(
'dbi:Pg:', { host => '10.0.0.3', port => 5434 }
),
'dbi:Pg:host=10.0.0.3;port=5434',
'_buildDataSource: trailing colon'
);
# Complex DSN with other params
is(
Apache::Session::Browseable::Store::Patroni::_buildDataSource(
'dbi:Pg:dbname=mydb;host=127.0.0.1;port=5432;sslmode=require',
{ host => '192.168.1.1', port => 5435 }
),
'dbi:Pg:dbname=mydb;sslmode=require;host=192.168.1.1;port=5435',
'_buildDataSource: complex DSN with other params'
);
}
# Test cache structure (multi-source support)
{
no warnings 'once';
# Clear cache
%Apache::Session::Browseable::Store::Patroni::patroniCache = ();
( run in 0.889 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )