Result:
found more than 615 distributions - search limited to the first 2001 files matching your query ( run in 2.381 )


DTA-CAB

 view release on metacpan or  search on metacpan

CAB/Server/HTTP/UNIX.pm  view on Meta::CPAN

use File::Basename qw(basename);
use DTA::CAB::Utils qw(:proc);
our @ISA = qw(HTTP::Daemon::ClientConn);

## ($pid,$uid,$gid) = $sock->peercred()
##  + gets peer credentials; returns (-1,-1,-1) on failure
sub peercred {
  my $sock = shift;
  if ($sock->can('SO_PEERCRED')) {
    my $buf = $sock->sockopt($sock->SO_PEERCRED);
    return unpack('lll',$buf);

CAB/Server/HTTP/UNIX.pm  view on Meta::CPAN

  ${*$sock}{'peerenv'} = \%env;
}

## $str = $sock->peerstr()
## $str = $sock->peerstr($uid,$gid,$pid)
##  + returns stringified unix peer credentials: "${USER}.${GROUP}[${PID}]"
sub peerstr {
  my ($sock,$pid,$uid,$gid) = @_;
  ($pid,$uid,$gid) = $sock->peercred() if (@_ < 4);
  return (
	  (defined($uid) ? (getpwuid($uid)//'?') : '?')

CAB/Server/HTTP/UNIX.pm  view on Meta::CPAN

	 );
}

## $host = peerhost()
##  + for relayed connections, gets underlying TCP peer via socat environment
##  + for unix connections, returns UNIX credentials as as for peerstr()
sub peerhost {
  my $sock = shift;

  ##-- get UNIX socket credentials
  my ($pid,$uid,$gid) = $sock->peercred();
  if (defined($pid) && basename(pid_cmd($pid)//'?') eq 'socat') {
    ##-- get socat environment variable if applicable
    my $env = $sock->peerenv();
    return $env->{DTA_CAB_RELAY_PEERADDR} if ($env && $env->{DTA_CAB_RELAY_PEERADDR});
  }

  ##-- return UNIX socket credentials
  return $sock->peerstr($pid,$uid,$gid);
}

## $port = peerport()
##  + for relayed connections, gets underlying TCP port via socat environment
##  + for unix connections, returns socket path
sub peerport {
  my $sock = shift;

  ##-- get UNIX socket credentials
  my ($pid,$uid,$gid) = $sock->peercred();
  if (defined($pid) && basename(pid_cmd($pid)//'?') eq 'socat') {
    ##-- get socat environment variable if applicable
    my $env = $sock->peerenv();
    return $env->{DTA_CAB_RELAY_PEERPORT} if ($env && $env->{DTA_CAB_RELAY_PEERPORT});

CAB/Server/HTTP/UNIX.pm  view on Meta::CPAN


=item peercred

 ($pid,$uid,$gid) = $sock->peercred();

Gets UNIX socket peer credentials; returns (-1,-1,-1) on failure.

=item peerenv

 \%env = $sock->peerenv();
 \%env = $sock->peerenv($pid);

CAB/Server/HTTP/UNIX.pm  view on Meta::CPAN

=item peerstr

 $str = $sock->peerstr();
 $str = $sock->peerstr($uid,$gid,$pid);

Returns stringified unix peer credentials, "${USER}.${GROUP}[${PID}]".

=item peerhost

 $host = peerhost();

For relayed connections, gets underlying TCP peer via socat environment (INET emulation);
for unix connections, returns UNIX credentials as as for peerstr().

=item peerport

 $port = peerport();

 view all matches for this distribution


Daemonise

 view release on metacpan or  search on metacpan

lib/Daemonise.pm  view on Meta::CPAN


At this point all required plugins for Dist::Zilla and modules to run tests
should be installed. Daemonise uses PGP signed github releases, so make sure your
git config user and email are setup correctly as well as a PGP key that matches
your git(hub) account email. Try Config::Identity for a PGP encrypted file of
your github account credentials in ~/.github for convenience.
Finally run:

    dzil release

which will do all the work (build, test, sign, tag, update github, upload).

 view all matches for this distribution


Dancer-Plugin-Auth-Google

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Auth/Google.pm  view on Meta::CPAN

a new one.

After that, in the sidebar on the left, select "OAuth Consent Screen".

Inside, go to the I<Branding> tab and set it up with you website's
logo, desired credentials (the "email" and "profile" ones are granted
by default) and, specially, your B<authorized domains>. We'll need those for
the next step!

Now go to the I<Clients> tab and click the B<< + Create client >>
button/dropdown to create an B<OAuth client ID>.

 view all matches for this distribution


Dancer-Plugin-Auth-RBAC-Credentials-Catmandu

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Auth/RBAC/Credentials/Catmandu.pm  view on Meta::CPAN

sub authorize {
    my($self,$options,@arguments) = @_;
    my($login,$password) = @arguments;

    #what are you doing here? You're already in!
    my $user = $self->credentials;
    if(is_hash_ref($user) && ($user->{id} || $user->{login}) && !@{$user->{error}}){

        return $user;

    }

lib/Dancer/Plugin/Auth/RBAC/Credentials/Catmandu.pm  view on Meta::CPAN

        $self->errors('login and password are required');
        return;

    }

    # authorize a new account using supplied credentials
    my $account = $self->bag($options)->get($login);

    if(!is_hash_ref($account)){

        $self->errors('login and/or password is invalid');

lib/Dancer/Plugin/Auth/RBAC/Credentials/Catmandu.pm  view on Meta::CPAN

        login => $account->{login},
        roles => [@{$account->{roles}}],
        error => []
    };

    return $self->credentials($session_data);

}

=head1 NAME

lib/Dancer/Plugin/Auth/RBAC/Credentials/Catmandu.pm  view on Meta::CPAN


=head2 adjust your Dancer config.yml

plugins:
 Auth::RBAC:
  credentials:
   class: Catmandu
   options:
    #name of store in catmandu.yml
    store: 'default'
    #name of table

 view all matches for this distribution


Dancer-Plugin-Auth-RBAC-Credentials-DBIC

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Auth/RBAC/Credentials/DBIC.pm  view on Meta::CPAN

        my $role_name_field = $options->{role_name_field} ||= "name";
        my $user_rs = schema($options->{handle})->resultset($moniker);

        if (my $user = $user_rs->find({ $login_field => $login })) {
            if ($self->_check_password($options, $user, $password)) {
                return $self->credentials({
                    id => $user->$id_field,
                    name => $user->$name_field,
                    login => $user->$login_field,
                    roles => defined($role_relation) ? [ $user->$role_relation->get_column($role_name_field)->all ] : [],
                    error => [],

lib/Dancer/Plugin/Auth/RBAC/Credentials/DBIC.pm  view on Meta::CPAN


        $self->errors('login and/or password is invalid');
        return 0;
    }
    else {
        my $user = $self->{credentials};
        if ($user->{id} || $user->{login} && !@{$user->{error}}) {
            return $user;
        }
        else {
            $self->errors('you are not authorized', 'your session may have ended');

lib/Dancer/Plugin/Auth/RBAC/Credentials/DBIC.pm  view on Meta::CPAN

    plugins:
      DBIC:
        Auth:
          dsn: "dbi:SQLite:dbname=./foo.db"
      Auth::RBAC:
        credentials:
          class: DBIC

The following config options are avaialable:

=over

 view all matches for this distribution


Dancer-Plugin-Auth-RBAC-Permissions-DBIC

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Auth/RBAC/Permissions/DBIC.pm  view on Meta::CPAN


sub subject_asa {
    my ($self, $options, @arguments) = @_;
    my $role = shift @arguments;
    return unless $role;
    my $user = $self->credentials;
    return unless $user->{id};
    my $settings = $class::settings;

    my $moniker = $options->{user_moniker} ||= "User";
    my $role_relation = exists($options->{role_relation}) ? $options->{role_relation} : "roles";

lib/Dancer/Plugin/Auth/RBAC/Permissions/DBIC.pm  view on Meta::CPAN


sub subject_can {
    my ($self, $options, @arguments) = @_;
    my ($operation, $action) = @arguments;
    return unless $operation && $action;
    my $user = $self->credentials;
    return unless $user->{id};
    my $settings = $class::settings;

    my $moniker = $options->{user_moniker} ||= "User";
    my $role_relation = exists($options->{role_relation}) ? $options->{role_relation} : "roles";

lib/Dancer/Plugin/Auth/RBAC/Permissions/DBIC.pm  view on Meta::CPAN

    plugins:
      DBIC:
        Auth:
          dsn: "dbi:SQLite:dbname=./foo.db"
        Auth::RBAC:
          credentials:
            class: DBIC
          permissions:
            class: DBIC

The following config options are avaialable:

 view all matches for this distribution


Dancer-Plugin-Auth-RBAC

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Auth/RBAC.pm  view on Meta::CPAN

};


sub new {
    my $class = shift;
    my @credentials = @_;
    
    my $credentialsClass =
    __PACKAGE__ . "::Credentials::" . $settings->{credentials}->{class};
    {
        no warnings 'redefine';
        $credentialsClass =~ s/::/\//g;
        require "$credentialsClass.pm";
        $credentialsClass =~ s/\//::/g;
    }
    
    my $self = {};
    bless $self, $class;
    
    # return $credentialsClass->new
    # unless scalar @credentials;
    
    my $user = session('user');
    
    if ($user) {
        # reset authentication errors

lib/Dancer/Plugin/Auth/RBAC.pm  view on Meta::CPAN

        };
    }
    
    session 'user' => $user;
    
    #return $credentialsClass->new->authorize($settings->{credentials}->{options}, @credentials)
    #? $self : undef;
    
    $credentialsClass->new->authorize($settings->{credentials}->{options}, @credentials);
    return $self;
}

sub asa {
    my $self = shift;

lib/Dancer/Plugin/Auth/RBAC.pm  view on Meta::CPAN


=head1 CONFIGURATION

    plugins:
      Auth::RBAC:
        credentials:
          class: Config
          options:
            accounts:
              user01:
                password: foobar

 view all matches for this distribution


Dancer-Plugin-Auth-Twitter

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Auth/Twitter.pm  view on Meta::CPAN

            token_secret => $token_secret,
            verifier     => $verifier,
        });
        my $twitter_user_hash;
        my $success = eval {
            $twitter_user_hash = twitter->verify_credentials({
                -token        => $access->{oauth_token},
                -token_secret => $access->{oauth_token_secret},
            });
            1;
        };

 view all matches for this distribution


Dancer-Plugin-Authorize

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Authorize.pm  view on Meta::CPAN

};


sub new {
    my $class = shift;
    my @credentials = @_;
    
    my $credentialsClass =
    __PACKAGE__ . "::Credentials::" . $settings->{credentials}->{class};
    {
        no warnings 'redefine';
        $credentialsClass =~ s/::/\//g;
        require "$credentialsClass.pm";
        $credentialsClass =~ s/\//::/g;
    }
    
    my $self = {};
    bless $self, $class;
    
    # return $credentialsClass->new
    # unless scalar @credentials;
    
    my $user = session('user');
    
    if ($user) {
        # reset authentication errors

lib/Dancer/Plugin/Authorize.pm  view on Meta::CPAN

        };
    }
    
    session 'user' => $user;
    
    #return $credentialsClass->new->authorize($settings->{credentials}->{options}, @credentials)
    #? $self : undef;
    
    $credentialsClass->new->authorize($settings->{credentials}->{options}, @credentials);
    return $self;
}

sub asa {
    my $self = shift;

lib/Dancer/Plugin/Authorize.pm  view on Meta::CPAN


=head1 CONFIGURATION

    plugins:
      Authorize:
        credentials:
          class: Config
          options:
            accounts:
              user01:
                password: foobar

 view all matches for this distribution


Dancer-Plugin-CORS

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/CORS.pm  view on Meta::CPAN

			} else {
				$headers->{'Timing-Allow-Origin'} = 'null';
			}
		}
		
		if (exists $options->{credentials}) {
			if (!!$options->{credentials}) {
				if ($origin eq '*') {
					warning('For a resource that supports credentials a origin matcher must be specified.');
					next RULE;
				}
				$headers->{'Access-Control-Allow-Credentials'} = 'true' ;
			}
		}

lib/Dancer/Plugin/CORS.pm  view on Meta::CPAN

    use Dancer::Plugin::CORS;

    get '/foo' => sub { ... };
	share '/foo' =>
		origin => 'http://localhost/',
		credentials => 1,
		expose => [qw[ Content-Type ]],
		method => 'GET',
		headers => [qw[ X-Requested-With ]],
		maxage => 7200,
		timing => 1,

lib/Dancer/Plugin/CORS.pm  view on Meta::CPAN

		grep { $host eq $_ } qw(localhost 127.0.0.1 ::1)
	}

Hint: a origin consists of protocol, hostname and maybe a port. Examples: C<http://www.example.com>, C<https://securesite.com>, C<http://localhost:3000>, C<http://127.0.0.1>, C<http://[::1]>

=item I<credentials>

This indicates whether cookies, HTTP authentication and/or client-side SSL certificates may sent by a client. Allowed values are C<0> or C<1>.

This option must be used together with I<origin>.

 view all matches for this distribution


Dancer-Plugin-FakeCGI

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/FakeCGI/Apache1.pm  view on Meta::CPAN

    #
    # Try to get as much info as possible from CGI.pm, which has
    # workarounds for things like the IIS PATH_INFO bug.
    #
    $self->{headers_in} ||= Apache::Table->new(
        'Authorization' => $self->{query}->auth_type,    # No credentials though.

        #'Cookie' => $ENV{HTTP_COOKIE} || $ENV{COOKIE},
        'Content-Length' => $ENV{CONTENT_LENGTH},
        'Content-Type'   => (
              $self->{query}->can('content_type')

 view all matches for this distribution


Dancer-Plugin-LDAP

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/LDAP/Handle.pm  view on Meta::CPAN

    return $self->{dancer_settings}->{base};
}

=head2 rebind

Rebind with credentials from settings.

=cut

sub rebind {
    my ($self) = @_;

 view all matches for this distribution


Dancer-Plugin-Mango

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Mango.pm  view on Meta::CPAN


    $dbh->default_db($settings->{db_name})
        if defined $settings->{db_name};

    if (defined $settings->{username} && defined $settings->{password}) {
        push @{$settings->{db_credentials}}, [ $settings->{db_name}, $settings->{username}, $settings->{password}];
    }


    if (defined $settings->{db_credentials} and ref $settings->{db_credentials} eq 'ARRAY') {
        $dbh->credentials($settings->{db_credentials});
    }

    if (defined $settings->{ioloop}) {
        my ( $module, $function ) = split(/\-\>/, $settings->{ioloop});
        $dbh->ioloop($module->$function);

lib/Dancer/Plugin/Mango.pm  view on Meta::CPAN

            db_name: "mydb"
            username: "myuser"
            password: "mypass"
            w: 1
            wtimeout: 1000
            credentials:
                [ mydb, myuser, mypass]
                [ myotherdb, myotheruser, myotherpass]

or:

 view all matches for this distribution


Dancer-Plugin-MongoDB

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/MongoDB.pm  view on Meta::CPAN


    $dbh->default_db($settings->{db_name})
        if defined $settings->{db_name};

    if (defined $settings->{username} && defined $settings->{password}) {
        push @{$settings->{db_credentials}}, [ $settings->{db_name}, $settings->{username}, $settings->{password}];
    }


    if (defined $settings->{db_credentials} and ref $settings->{db_credentials} eq 'ARRAY') {
        $dbh->credentials($settings->{db_credentials});
    }

    if (defined $settings->{ioloop}) {
        my ( $module, $function ) = split(/\-\>/, $settings->{ioloop});
        $dbh->ioloop($module->$function);

lib/Dancer/Plugin/MongoDB.pm  view on Meta::CPAN

            db_name: "mydb"
            username: "myuser"
            password: "mypass"
            w: 1
            wtimeout: 1000
            credentials:
                [ mydb, myuser, mypass]
                [ myotherdb, myotheruser, myotherpass]

or:

 view all matches for this distribution


Dancer-Plugin-SporeDefinitionControl

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/SporeDefinitionControl.pm  view on Meta::CPAN

            next if $ko;
            $is_ok = 1;
        }
        return _returned_error($error,400) unless $is_ok;
        
        #set the access-control-allow-credentials if needed
        _set_access_control_header($path_validation->{path}->{$req->{_route_pattern}});
      };
};


lib/Dancer/Plugin/SporeDefinitionControl.pm  view on Meta::CPAN

  #check that header contain origin and that url is permit by api
  $origin_allowed = $req->header('Origin') if ( defined $req->header('Origin') 
                                                  && defined $build_options_route->{'header_allow_allow_origins'} 
                                                  &&  $req->header('Origin') ~~ @{$build_options_route->{'header_allow_allow_origins'}}
                                                );
  header 'access-control-allow-credentials' => $build_options_route->{'header_allow_credentials'} || '';
  header 'access-control-allow-headers' => $build_options_route->{'header_allow_headers'} || '';
  header 'access-control-allow-methods' => join(",",@unique_methods,'OPTIONS');
  header 'access-control-allow-origin' => $origin_allowed if defined $origin_allowed;
  header 'access-control-max-age' => $build_options_route->{'header_max_age'}  || '';
}

 view all matches for this distribution


Dancer

 view release on metacpan or  search on metacpan

lib/Dancer/Exception.pm  view on Meta::CPAN

This method allows one to register custom exceptions, usable by Dancer users in
their route code (actually pretty much everywhere).

  # simple exception
  register_exception ('InvalidCredentials',
                      message_pattern => "invalid credentials : %s",
                     );

This registers a new custom exception. To use it, do:

  raise InvalidCredentials => "user Herbert not found";

The exception message can be retrieved with the C<$exception-E<gt>message> method, and we'll be
C<"invalid credentials : user Herbert not found"> (see methods in L<Dancer::Exception::Base>)

  # complex exception
  register_exception ('InvalidLogin',
                      composed_from => [qw(Fatal InvalidCredentials)],
                      message_pattern => "wrong login or password",

 view all matches for this distribution


Dancer2-Plugin-Auth-Extensible-Provider-LDAP

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/Auth/Extensible/Provider/LDAP.pm  view on Meta::CPAN

    }
    else {
        croak "username and password must be defined"
            unless defined $username && defined $password;

        $self->plugin->app->log( debug => "Binding to LDAP with credentials" );
        $mesg = $ldap->bind( $username, password => $password );
    }

    return $mesg;
}

 view all matches for this distribution


Dancer2-Plugin-Auth-Extensible-Rights

 view release on metacpan or  search on metacpan

t/01-base.t  view on Meta::CPAN

        ];
    $jar->add_cookie_header($req);
    my $res = $test->request($req);
    $jar->extract_cookies($res);

    ok $res->content =~ m/LOGIN FAILED/, "login with bad credentials get catched"
}
{
    # good login

    $trap->read;

 view all matches for this distribution


Dancer2-Plugin-Auth-HTTP-Basic-DWIW

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/Auth/HTTP/Basic/DWIW.pm  view on Meta::CPAN

            if(my $handler = $HANDLERS->{check_login}) {
                if(ref($handler) eq 'CODE') {
                    my $check_result = eval { $handler->($username, $password); };

                    if($@) {
                        $dsl->error("Error while validating credentials: $@");
                        die \500;
                    }

                    if(!$check_result) {
                        die \401;

lib/Dancer2/Plugin/Auth/HTTP/Basic/DWIW.pm  view on Meta::CPAN


=head1 DESCRIPTION

This plugin gives you the option to use HTTP Basic authentication with Dancer2.

You can set a handler to check the supplied credentials. If you don't set a handler, every username/password combination will work.

=head1 CAUTION

Don't ever use HTTP Basic authentication over clear-text connections! Always use HTTPS!

 view all matches for this distribution


Dancer2-Plugin-Auth-OAuth

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/Auth/OAuth/Provider/Twitter.pm  view on Meta::CPAN

    my $request = Net::OAuth->request("protected resource")->new(
        $self->_default_args_v1,
        token           => $session_data->{twitter}{access_token},
        token_secret    => $session_data->{twitter}{access_token_secret},
        request_method  => 'GET',
        request_url     => 'https://api.twitter.com/1.1/account/verify_credentials.json',
    );
    $request->sign;

    my $resp = $self->ua->request(GET $request->to_url);
    if ($resp->is_success) {

 view all matches for this distribution


Dancer2-Plugin-GraphQL

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/GraphQL.pm  view on Meta::CPAN

      Object.assign(headers, extra_headers);
      return fetch(fetchURL, {
        method: 'post',
        headers: headers,
        body: JSON.stringify(graphQLParams),
        credentials: 'include',
      }).then(function (response) {
        return response.text();
      }).then(function (responseBody) {
        try {
          return JSON.parse(responseBody);

 view all matches for this distribution


Dancer2-Plugin-Growler

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/Growler.pm  view on Meta::CPAN


    use Dancer2::Plugin::Growler;

    …

    my $error = locale->maketext('Invalid login credentials.'); # locale() is from L<Dancer2::Plugin::Locale>
    growl_error($error); 
    redirect '/login';

    …

 view all matches for this distribution


Dancer2-Plugin-HTTP-Auth-Extensible

 view release on metacpan or  search on metacpan

t/30-authenticate_Basic.t  view on Meta::CPAN

    $req->authorization_basic ( 'foo', 'bar');
    my $res = $cb->( $req );
    is (
        $res->code,
        401,
        'Status 401: without proper credentials'
    );
    is (
        $res->headers->header('WWW-Authenticate'),
        qq|Basic realm="some_realm"|,
        'HTTP-field: WWW-Authentication without proper credentials'
    );
    isnt ( # negative testing, we should not get this content
        $res->content,
        qq|Access granted for default realm|,
        'Delivering: without proper credentials'
    );
};

test_psgi $app, sub {
    my $cb = shift;

t/30-authenticate_Basic.t  view on Meta::CPAN

    $req->authorization_basic ( 'dave', 'beer');
    my $res = $cb->( $req );
    is (
        $res->code,
        200,
        'Status 200: with the right credentials'
    );
    isnt ( # negative testing, we should not be required to authenticate
        $res->headers->header('WWW-Authenticate'),
        qq|Basic realm="some_realm"|,
        'HTTP-field: WWW-Authentication with the right credentials'
    );
    is (
        $res->content,
        qq|Access granted for default realm|,
        'Delivering: with the right credentials'
    );
};

#
# Roles

 view all matches for this distribution


Dancer2-Plugin-SPID

 view release on metacpan or  search on metacpan

lib/Dancer2/Plugin/SPID.pm  view on Meta::CPAN


    dance;

=head1 ABSTRACT

This Perl module is a plugin for the L<Dancer2> web framework. It allows developers of SPID Service Providers to easily add SPID authentication to their Dancer2 applications. L<SPID|https://www.spid.gov.it/> is the Italian digital identity system, wh...

This module provides the highest level of abstraction and ease of use for integration of SPID in a Dancer2 web application. Just set a few configuration options and you'll be able to generate the HTML markup for the SPID button on the fly (to be comp...

See the F<example/> directory for a demo application.

 view all matches for this distribution


Dancer2-Session-Pg

 view release on metacpan or  search on metacpan

lib/Dancer2/Session/Pg.pm  view on Meta::CPAN

=head1 DESCRIPTION

Stores Dancer2 sessions in PostgreSQL, and uses PostgreSQL's own features to
make that storage safer than a serialised blob in a table.

A web session is not ordinary data. It frequently carries the credentials that
prove who somebody is -- with OpenID Connect, an access token and a refresh
token -- so the store is worth more than the account it belongs to. Three
properties follow from that, and each is provided by the database rather than by
convention:

lib/Dancer2/Session/Pg.pm  view on Meta::CPAN

has been altered fails to decrypt instead of deserialising into a structure the
application would then trust.

Nor does it hand over a way in. B<The session id is stored as a SHA-256 digest,
not verbatim>, because the id is the session cookie: a table full of raw ids
would be a table full of working credentials, usable against the live
application by anyone who read a backup, no key required. What a dump contains
is digests, which open nothing.

The id is also authenticated with the payload, so a sealed payload opens only
under the session it was written for and cannot be moved from one row to

lib/Dancer2/Session/Pg.pm  view on Meta::CPAN

    COMMENT ON COLUMN web.sessions.created IS
        'When the row was first written. Server clock.';
    COMMENT ON COLUMN web.sessions.updated IS
        'When the row was last written. Server clock.';
    COMMENT ON COLUMN web.sessions.expires IS
        'When the session stops being valid. Every read filters on it. NULL means no expiry, which is rarely right for a session holding credentials.';

    CREATE INDEX sessions_principal_id_idx
        ON web.sessions (principal_id) WHERE principal_id IS NOT NULL;
    COMMENT ON INDEX web.sessions_principal_id_idx IS
        'OPTIONAL. Supports destroy_for_principal and sessions_for_principal. Partial: sessions without a principal id are not indexed.';

lib/Dancer2/Session/Pg.pm  view on Meta::CPAN

=head2 The threat this module is built for

Somebody reads the database and does not have the application. A backup, a
replica, a support copy of a table, a dump in a ticket, a stolen disk. The
payload is encrypted with an AEAD cipher, so what they get is the shape of your
session traffic and not the credentials in it.

B<It is not built for an attacker who has the application's memory or its
configuration.> The key is in the process, so anyone who can read the process or
the file the key came from can read every session. Encryption at rest moves the
secret from the database to the key store; it does not remove it.

lib/Dancer2/Session/Pg.pm  view on Meta::CPAN

on the request path otherwise produces a log nobody can read -- and because a
repeated message is how an attacker poking at cookies fills your disk.

If you want per-session audit logging, do it in the application, where you have
the request, the user and a policy about retention. A session store is the wrong
layer to decide that credentials belong in a log file.

=head1 WHAT AN UNREADABLE ROW DOES

A row that cannot be decrypted -- wrong key, a cipher this engine cannot read, a
payload somebody has edited -- is treated as B<a session that does not exist>.

 view all matches for this distribution


Dancer2

 view release on metacpan or  search on metacpan

Releasing-Dancer2.md  view on Meta::CPAN


The test suite *must* pass before a release can be done. This is your
last chance to resolve any test failures.

Provided the tests pass, you will be prompted to continue the release
process. Provided you have your PAUSE credentials set up, this will
upload the new dist to PAUSE. If you don't have a credential file set
up, you can manually update the new release via the PAUSE web interface.

### Send out release announcements

 view all matches for this distribution


DarkPAN-Indexer

 view release on metacpan or  search on metacpan

lib/DarkPAN/Indexer/Storage/S3.pm  view on Meta::CPAN

########################################################################
  my ($self) = @_;

  return $self->{s3} //= Amazon::S3::Lite->new(
    { region      => $self->{region},
      credentials => Amazon::Credentials->new( profile => $self->{profile} ),
    }
  );
}

########################################################################

 view all matches for this distribution


DarkPAN-Resolver-SQLite

 view release on metacpan or  search on metacpan

lib/DarkPAN/Resolver/SQLite.pm  view on Meta::CPAN

browser or C<cpanm --mirror> would use), for example
C<https://cpan.openbedrock.net/orepan2>. The resolver fetches the index from
C<< <mirror-url>/modules/packages.db.gz >>.

Only a public HTTP(S) URL is required -- the resolver uses L<HTTP::Tiny> and does
B<not> need AWS credentials or S3 access, even for an S3-backed DarkPAN fronted
by CloudFront. (HTTPS requires L<IO::Socket::SSL>/L<Net::SSLeay> to be present,
as with any C<HTTP::Tiny> https use.)

=head1 HOW IT WORKS

 view all matches for this distribution


Dash

 view release on metacpan or  search on metacpan

share/assets/dash_core_components/async~plotlyjs.js  view on Meta::CPAN

(window.webpackJsonpdash_core_components=window.webpackJsonpdash_core_components||[]).push([[5],{685:function(t,e){!function(r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define([],r):("undefined"!=typeof windo...

 view all matches for this distribution


( run in 2.381 seconds using v1.01-cache-2.11-cpan-3f962061493 )