apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
7.93k stars 1.79k forks source link

shade.identifier and custom encryptionproblem #7117

Open a11dev opened 3 months ago

a11dev commented 3 months ago

Search before asking

What happened

updated config template adding shade.identifier with mine encryption identifier , it seems not recognized, and into the log I see

2024-07-05 15:25:47,914 INFO [o.a.s.c.s.u.ConfigShadeUtils ] [main] - Load config shade spi: [base64] 2024-07-05 15:25:48,101 INFO [o.a.s.c.s.c.ConfEncryptCommand] [main] - Encrypt config:

and nothing happen ( the file is not encrypted). shade.identifier = "base64" works as expected.

ConfigShade implementation jar is located into ${SEATUNNEL_HOME}/lib it structure is: org\myapp\classes* for ConfigShade implementation resources\META-INF\services\org.apache.seatunnel.api.configuration.ConfigShade META-INF* maven project folder

here a snippet:

[...] public class Myconfigshade implements ConfigShade { private static Logger logger = LoggerFactory.getLogger(Myconfigshade.class);

@Override
public String getIdentifier() {
    // TODO Auto-generated method stub

    return "myprotection";
}

@Override
public String encrypt(String content) {

[...]

SeaTunnel Version

2.3.5

SeaTunnel Config

{
    "env" : {
        "parallelism" : 2,
        "job.mode" : "STREAMING",
        "job.name" : "SeaTunnel_Job",
        "read_limit.bytes_per_second" : 7000000,
        "read_limit.rows_per_second" : 400,
        "checkpoint.interval" : 10000,
        "shade.identifier" : "myprotection"
    },
    "source" : [
        {
[...]

Running Command

seatunnel.bat --config config/v2.batch.template --encrypt

Error Exception

no error reported

Zeta or Flink or Spark Version

No response

Java or Scala Version

openjdk version "21.0.2" 2024-01-16

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

Hisoka-X commented 3 months ago

have you restart the seatunnel server?

a11dev commented 3 months ago

Since I can access the source only using jdbc I'm using batch mode, btw I tried --encrypt and password are not encrypted as expected.

I also notice, using base64 password are encrypted but the config output is not written using "standard configuration syntax" but json.

I'll continue my test!

Thanks for your feedbacks

Ale

Il mar 9 lug 2024, 16:37 Jia Fan @.***> ha scritto:

have you restart the seatunnel server?

— Reply to this email directly, view it on GitHub https://github.com/apache/seatunnel/issues/7117#issuecomment-2217905672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2V565SBKW3K5S4UR5SWE3ZLPYRXAVCNFSM6AAAAABKNKTJISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJXHEYDKNRXGI . You are receiving this because you authored the thread.Message ID: @.***>

a11dev commented 3 months ago

Hi, sorry for my ignorance, which is your name "Jin" or "Fan" based on Italian customs, should be Fun...but better asking.

I'm setting up a seatunnel dev environment, trying to avoid to many questions ;) I'm using VSCode (IDEA is not available ). Which is the starting class to start the debug process? core.starter.seatunnel.SeaTunnelClient?

Thanks Alessandro

Il giorno mar 9 lug 2024 alle ore 16:37 Jia Fan @.***> ha scritto:

have you restart the seatunnel server?

— Reply to this email directly, view it on GitHub https://github.com/apache/seatunnel/issues/7117#issuecomment-2217905672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2V565SBKW3K5S4UR5SWE3ZLPYRXAVCNFSM6AAAAABKNKTJISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJXHEYDKNRXGI . You are receiving this because you authored the thread.Message ID: @.***>

Hisoka-X commented 3 months ago

Try start with our example module. image It will show you the basic process of submitting and running a job. Everything is ready, just click Run.

a11dev commented 3 months ago

Thanks, Debugger is running , as soon as possible I'll start testing mine encryption class

Thanks Ale

Il gio 11 lug 2024, 09:53 Jia Fan @.***> ha scritto:

Try start with our example module. image.png (view on web) https://github.com/apache/seatunnel/assets/32387433/43d266a1-86a0-43a9-aa24-90db0e977045 It will show you the basic process of submitting and running a job. Everything is ready, just click Run.

— Reply to this email directly, view it on GitHub https://github.com/apache/seatunnel/issues/7117#issuecomment-2222271305, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2V564YQ5HXOITEKDNZFQLZLY2WDAVCNFSM6AAAAABKNKTJISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRSGI3TCMZQGU . You are receiving this because you authored the thread.Message ID: @.***>