RDS MySQL

Apono integration for AWS-managed SQL for the secure management of access to the SQL managed database system

MySQL is a reliable, stable, and secure open-source relational database system serving as a primary data store for various applications, websites, and products, including mission-critical applications and dynamic websites. AWS enables developers to create cloud-hosted MySQL databases.

Through this integration, Apono helps you securely manage access to your AWS RDS for MySQL databases.



Prerequisites

Before starting this integration, create the items listed in the following table.

Item Description
Apono Connector On-prem connection with network access to your Amazon RDS for MySQL database

Minimum Required Version: 1.5.3

Use the following steps to update an existing connector.

ℹ️

When installing the Apono connector with CloudFormation, the AWS RDS database policy is automatically created.

If you do not use CloudFormation, you must create the following policy and assign it to the Apono connector role.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "rds-db:connect",
            "Resource": "arn:aws:rds-db:*:*:dbuser:*/apono_connector",
            "Effect": "Allow"
        }
    ]
}
MySQL Info Information for the database instance to be integrated:
  • Instance ID
  • Database Name
AWS Tag(Optional) Metadata label assigned to AWS resources

Adding an AWS tag, enables Apono to discover and add resources on your behalf.

When adding an AWS tag, use the following information:


Create an AWS RDS MySQL user

You must create a user in your AWS RDS MySQL instance for the Apono connector and grant that user permissions to your databases.

Follow these steps to create a user and grant it database permissions:

  1. Create a new user with either Built-in authentication or IAM authentication.

    ⚠️

    You can use only one authentication option on the RDS instance at a time.

    Built-in Authentication

    Built-in authentication identifies a user through a username and password.

    To set the username and password, run the following command from your MySQL client.

    CREATE USER 'apono_connector'@'%' IDENTIFIED BY 'password';
    

    Be sure to select a strong password for the user.


    IAM authentication

    After enabling IAM on your RDS instance, create an AWSAuthenticationPlugin user for the Apono connector. AWSAuthenticationPlugin is an AWS-provided plugin that works seamlessly with IAM to authenticate your users.

    To create the user, run the following command from your MySQL client.

    CREATE USER apono_connector IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';
    

  1. From your preferred client tool, grant the following accesses to the user.

    GRANT SHOW DATABASES ON *.* TO 'apono_connector'@'%';
    GRANT CREATE USER ON *.* TO 'apono_connector'@'%';  
    GRANT UPDATE ON mysql.* TO 'apono_connector'@'%';  
    GRANT PROCESS ON *.* TO 'apono_connector'@'%';
    
    PermissionDescription
    GRANT SHOW DATABASES ON . TO 'apono_connector'@'%';Allows the user to view all databases in the RDS instance
    GRANT CREATE USER ON . TO 'apono_connector'@'%';*Grants the ability to create new users
    GRANT UPDATE ON mysql.* TO 'apono_connector'@'%';Permits updates in the MySQL system database, including user privileges
    GRANT PROCESS ON . TO 'apono_connector'@'%';Allows viewing the server's process list, including all executing queries

  1. (IAM authentication only) Create and attach the following IAM policy to your identity center permissions set or role.

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "rds-db:connect"
                ],
                "Resource": [
                    "arn:aws:rds-db:*:*:dbuser:*/${SAML:sub}"
                ]
            },
            {
                "Effect": "Allow",
                "Action": [
                    "rds:DescribeDBInstances"
                ],
                "Resource": [
                    "arn:aws:rds:*:*:db:*"
                ]
            }
        ]
    }
    

  1. (MySQL 8.0+) Grant the service account the authority to manage other roles. This enables Apono to create, alter, and drop roles. However, this role does not inherently grant specific database access permissions.

    GRANT ROLE_ADMIN on *.* to 'apono_connector';
    

  1. (Built-in authentication only) Create an AWS secret with the credentials from step 1.

    ℹ️

    When using IAM authentication, a secret does not need to be created.

    The service account and its permissions are managed through IAM roles and policies. The service account is used to authenticate the MySQL instance instead of a secret.




Integrate AWS RDS MySQL

Amazon RDS tile

AWS RDS MySQL tile


Follow these steps to complete the integration:

  1. On the Catalog tab, click AWS RDS MySQL. The Connect Integration page appears.
  2. Under Discovery, click one or more resource types to sync with Apono.

    ℹ️

    Apono automatically discovers and syncs all the instances in the environment. After syncing, you can manage Access Flows to these resources.

  3. Click Next. The Apono connector section expands.
  4. From the dropdown menu, select a connector. Choosing a connector links Apono to all the services available on the account where the connector is located.

    💡

    If the desired connector is not listed, click + Add new connector and follow the instructions for creating an AWS connector.

  5. Click Next. The Integration Config section expands.
  6. Define the Integration Config settings.
    Setting Description
    Integration Name Unique, alphanumeric, user-friendly name used to identify this integration when constructing an access flow
    Auth Type Authorization type for the MySQL service account user
    Option Description
    IAM Auth IAM authentication
    User / Password Built-in authentication
    Region Location where the MySQL instance is deployed
    Instance ID ID of the MySQL instance

  1. Click Next. The Secret Store section expands.
  2. Associate the secret or credentials:
  3. Click Next. The Get more with Apono section expands.
  4. Define the Get more with Apono settings.
    Setting Description
    Credential Rotation (Optional) Number of days after which the database credentials must be rotated
    Custom Access Details (Optional) Instructions explaining how to access this integration's resources

    Upon accessing an integration, a message with these instructions will be displayed to end users in the User Portal. The message may include up to 400 characters.

    To view the message as it appears to end users, click Preview.

    NOTE: You can also add the custom_access_details parameter to the apono_integration schema using Terraform. For more information, learn how to integrate with Apono in the Terraform Registry.
    Integration Owner (Optional) Fallback approver if no resource owner is found

    Follow these steps to define one or several integration owners:
    1. From the Attribute dropdown menu, select User or Group under the relevant identity provider (IdP) platform.
    2. From the Value dropdown menu, select one or multiple users or groups.

    NOTE: When Resource Owner is defined, an Integration Owner must be defined.
    Resource Owner (Optional) Group or role responsible for managing access approvals or rejections for the resource

    Follow these steps to define one or several resource owners:
    1. Enter a Key name. This value is the name of the tag created in your cloud environment.

    2. From the Attribute dropdown menu, select an attribute under the IdP platform to which the key name is associated.

      Apono will use the value associated with the key (tag) to identify the resource owner. When you update the membership of the group or role in your IdP platform, this change is also reflected in Apono.

    NOTE: When this setting is defined, an Integration Owner must also be defined.

  1. Click Confirm.

Now that you have completed this integration, you can create access flows that grant permission to your RDS for MySQL database.