Mitto v2.9 Sneak Peek - Database Credentials

Pre Mitto v2.9, job configs that referenced databases via a dbo parameter included the username and password in the dbo string.

For example:

{
    "dbo": "{driver}://{username}:{password}@{server}:{port}/{database}?{parameters}",
    ...
}

These jobs types included io jobs that used a database as an input or output, sql jobs, monitor jobs, etc.

In Mitto v2.9, the credentials functionality has been expanded to include databases. This means any job that references a database can use a new credentials key and reference a Mitto credential rather than hardcoded credentials in every dbo.

This means, the example job above can be this instead:

{
    "dbo": "{driver}://{server}:{port}/{database}?{parameters}",
    "credentials": "{credential_name}"
    ...
}

The credentials key’s value {credential_name} references a Mitto credential that stores the database’s username and password.

There are two big benefits here to Mitto users:

  1. Securely store database credentials as a single Mitto credential
  2. Easily update database usernames and passwords across many jobs by simply updating the single Mitto credential

Disclaimer: Content discussed in this thread is subject to change pending product release.

2 Likes

Using this example to generate the following connection object but getting an error:

“output”: {
“dbo”: “snowflake://[snowflake-user].us-east-2.aws.snowflakecomputing.com/analytics”,
“credentials”: “snowflake”,
“schema”: “raw_reserve”,
“tablename”: “company”,
“use”: “call:mitto.iov2.db#todb”
}

sqlalchemy.exc.ProgrammingError: (snowflake.connector.errors.ProgrammingError) 251005: None: User is empty
(Background on this error at: http://sqlalche.me/e/13/f405)

Hey @yoitsbenc this feature is for v2.9 which isn’t released yet.

1 Like