App-Sqitch

 view release on metacpan or  search on metacpan

lib/sqitch-authentication.pod  view on Meta::CPAN

=encoding UTF-8

=head1 Name

sqitch-authentication - Guide to using database authentication credentials with Sqitch

=head1 Description

For database engines that require authentication, Sqitch supports a number
of credential-specification options, and searches for them in a specific
sequence. These searches are performed in two parts: a search for a username
and a search for a password.

=head1 Usernames

lib/sqitch-authentication.pod  view on Meta::CPAN


Sadly, both the C<SNOWSQL_PRIVATE_KEY_PASSPHRASE> environment variable and
the C<priv_key_file_pwd> ODBC parameter must be set, as Sqitch uses ODBC to
maintain its registry and SnowSQL to execute change scripts.

=item ClickHouse

ClickHouse does not support password-less authentication, but does support
L<TLS Client authentication| https://clickhouse.com/docs/guides/sre/ssl-user-auth>.
Sqitch reads the C<$.openSSL.client> section of the
C<Client configuration|https://clickhouse.com/docs/interfaces/cli#connection-credentials>
to also configure is ODBC connection. For example, given this config:

   <config>
    <openSSL>
      <client>
        <certificateFile>my_cert_name.crt</certificateFile>
        <privateKeyFile>my_cert_name.key</privateKeyFile>
      </client>
    </openSSL>
  </config>

lib/sqitch-authentication.pod  view on Meta::CPAN


For ODBC connections from Sqitch, we can use connection settings in F<~/.odbc.ini>:

  [flipr_test]
  DRIVER = Exasol
  EXAHOST = localhost:8563
  EXAUID = sys
  EXAPWD = exasol
  AUTHMETHOD = refreshtoken

When combining the above, Sqitch doesn't need to know any credentials; they are
stored somewhat safely in F<~/.exasol/profiles.xml> and F<~/.odbc.ini>:

  > sqitch status db:exasol:flipr_test
  # On database db:exasol:flipr_test
  # Project:  flipr
  # ...
  #
  Nothing to deploy (up-to-date)
  > sqitch rebase --onto '@HEAD^' -y db:exasol:flipr_test
  Reverting changes to hashtags @v1.0.0-dev2 from db:exasol:flipr_test

lib/sqitch-authentication.pod  view on Meta::CPAN


=item C<connections.warehousename>

=item C<connections.dbname>

=back

=item ClickHouse

ClickHouse supports password configuration via its
L<client configuration file|https://clickhouse.com/docs/interfaces/cli#connection-credentials>.
Sqitch will read the C<host>, C<port>, C<database>, and C<password> parameters
from either the root of the configuration file, as well as the C<secure> and
C<openSSL.client> parameters, for example:

  <config>
    <user>username</user>
    <password>password</password>
    <secure>true</secure>
    <openSSL>
      <client>

lib/sqitch-authentication.pod  view on Meta::CPAN

    </openSSL>
  </config>

All but the C<openSSL.client> parameters may be set on a named connection
basis, matched by the host name in the target URL (or the
C<$CLICKHOUSE_HOSTNAME> environment variable). All the parameters are the
same except C<host> becomes C<hostname>. For example, to set parameters for
the host C<click.house>:

  <config>
    <connections_credentials>
      <connection>
        <name>click.house</name>
        <hostname>clickhouse.example.com</hostname>
        <port>9440</port>
        <secure>1</secure>
        <user>default</user>
        <password>password</password>
      </connection>
    </connections_credentials>
  </config>

Note that setting C<port> to 9440 will implicitly set the ODBC port to 8443
unless it's explicitly set to something else.

=back

=head2 Use C<$SQITCH_PASSWORD>

The C<$SQITCH_PASSWORD> environment variable can be used to specify the

lib/sqitchguides.pod  view on Meta::CPAN


sqitchguides - List of common Sqitch guides

=end private

The common Sqitch guides are:

  changes             Specifying changes for Sqitch
  configuration       Hierarchical engine and target configuration
  environment         Environment variables
  authentication      Specifying target authentication credentials
  tutorial            PostgreSQL Tutorial
  tutorial-firebird   Firebird Tutorial
  tutorial-mysql      MySQL Tutorial
  tutorial-oracle     Oracle Tutorial
  tutorial-sqlite     SQLite Tutorial
  tutorial-vertica    Vertica Tutorial
  tutorial-exasol     Exasol Tutorial
  tutorial-snowflake  Snowflake Tutorial

See C<< sqitch help <command> >> or C<< sqitch help <concept> >> to read about



( run in 0.430 second using v1.01-cache-2.11-cpan-73692580452 )