Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][Config] Support custom config keys for encrypt/decrypt #8511

Open
2 of 3 tasks
hailin0 opened this issue Jan 13, 2025 · 3 comments
Open
2 of 3 tasks

[Feature][Config] Support custom config keys for encrypt/decrypt #8511

hailin0 opened this issue Jan 13, 2025 · 3 comments
Assignees

Comments

@hailin0
Copy link
Member

hailin0 commented Jan 13, 2025

Search before asking

  • I had searched in the feature and found no similar feature requirement.

Description

Current

Currently we support encryption and decryption of fixed key fields.

env {
  parallelism = 1
  shade.identifier = "base64"
}

source {
  test-source1 {
    username = "c2VhdHVubmVs"
    password = "c2VhdHVubmVsX3Bhc3N3b3Jk"
    database-name = "inventory_vwyw0n"
    table-name = "products"
    base-url = "jdbc:mysql://localhost:56725"
   
    # 
    f1 = "c2VhdHVubmVs"
    config1.f1 = "c2VhdHVubmVs"
    config2.list = ["c2VhdHVubmVsX3Bhc3N3b3Jk", "c2VhdHVubmVsX3Bhc3N3b3Jk", "c2VhdHVubmVsX3Bhc3N3b3Jk"]
    config3 = {
        f2 = "c2VhdHVubmVs"
    }
  }
}

sink {
  console {
   
  }
}
  • output
env {
  parallelism = 1
  shade.identifier = "base64"
}

source {
  test-source1 {
    username = "seatunnel"
    password = "seatunnel_password"
    database-name = "inventory_vwyw0n"
    table-name = "products"
    base-url = "jdbc:mysql://localhost:56725"
   
    # current unsuported custom 
    f1 = "c2VhdHVubmVs"
    config1.f1 = "c2VhdHVubmVs"
    config2.list = ["c2VhdHVubmVsX3Bhc3N3b3Jk", "c2VhdHVubmVsX3Bhc3N3b3Jk", "c2VhdHVubmVsX3Bhc3N3b3Jk"]
    config3 = {
        f2 = "c2VhdHVubmVs"
    }
  }
}

sink {
  console {
   
  }
}

After changes

We expect to be able to customize the encryption and decryption field list after the change

  • input
env {
  parallelism = 1
  shade.identifier = "base64"
  shade.options = ["username", "password", "f1", "config1.f1 ",  "config2.list", "f2"]
}

source {
  test-source1 {
    username = "c2VhdHVubmVs"
    password = "c2VhdHVubmVsX3Bhc3N3b3Jk"
    database-name = "inventory_vwyw0n"
    table-name = "products"
    base-url = "jdbc:mysql://localhost:56725"
   
    # 
    f1 = "c2VhdHVubmVs"
    config1.f1 = "c2VhdHVubmVs"
    config2.list = ["c2VhdHVubmVsX3Bhc3N3b3Jk", "c2VhdHVubmVsX3Bhc3N3b3Jk", "c2VhdHVubmVsX3Bhc3N3b3Jk"]
    config3 = {
        f2 = "c2VhdHVubmVs"
    }

  }
}

sink {
  console {
   
  }
}
  • ouput
env {
  parallelism = 1
  shade.identifier = "base64"
  shade.options = ["username", "password", "f1", "config1.f1 ",  "config2.list"]
}

source {
  test-source1 {
    username = "seatunnel"
    password = "seatunnel_password"
    database-name = "inventory_vwyw0n"
    table-name = "products"
    base-url = "jdbc:mysql://localhost:56725"
   
    # 
    f1 = "seatunnel"
    config1.f1 = "seatunnel"
    config2.list = ["seatunnel_password", "seatunnel_password", "seatunnel_password"]
    config3 = {
        f2 = "seatunnel"
    }
  }
}

sink {
  console {
   
  }
}

update

  • Please update all testcase
  • Please update docs

Usage Scenario

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@remones
Copy link

remones commented Jan 13, 2025

Hi @hailin0 , I‘m a beginner of SeaTunnel, and I wanna try it

@zhangshenghang
Copy link
Member

thanks @remones

@cobolbaby
Copy link

Indeed, if custom encryption and decryption for fields are supported, then the S3 access_key and secret_key do not need to be handled separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants