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

ADBDEV-6682: Implement TLS options for PXF external tables #141

Open
wants to merge 4 commits into
base: pxf-6.x
Choose a base branch
from

Conversation

andr-sokolov
Copy link
Member

@andr-sokolov andr-sokolov commented Nov 13, 2024

TLS options implemented for PXF external tables

The requirement for using TLS is implemented for PXF external tables. The
communication takes place between the segment node and the PXF server and is
pointless without the PXF server. The testing shall be done in conjunction with
PXF server changes and is out of scope for this commit.

@andr-sokolov andr-sokolov changed the title Implement TLS options for PXF external tables ADBDEV-6682: Implement TLS options for PXF external tables Nov 13, 2024
@dkovalev1 dkovalev1 marked this pull request as ready for review December 4, 2024 04:41
{
const char *proto = get_pxf_protocol();

if (proto && strcmp(proto, "https") == 0 )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (proto && strcmp(proto, "https") == 0 )
if (proto && strcmp(proto, "https") == 0)

{
const char *proto = getenv(ENV_PXF_PROTOCOL);

if (proto == NULL) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An opening bracket after if should be in the next line - this is code style of PostgreSQL. As an alternative the brackets can be removed here

Comment on lines +200 to +207
long verifypeer = PXF_DEFAULT_SSL_VERIFY_PEER;

if (verify_peer_var != NULL)
{
verifypeer = atol(verify_peer_var);
}

return verifypeer;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to remove the verifypeer variable

Suggested change
long verifypeer = PXF_DEFAULT_SSL_VERIFY_PEER;
if (verify_peer_var != NULL)
{
verifypeer = atol(verify_peer_var);
}
return verifypeer;
if (verify_peer_var != NULL)
{
return atol(verify_peer_var);
}
return PXF_DEFAULT_SSL_VERIFY_PEER;

@@ -116,6 +128,85 @@ get_pxf_port(void)
return port;
}

const char *
get_pxf_ssl_keypasswd(void)
Copy link
Member

@RekGRpth RekGRpth Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about only two functions

const char *getenv_char(const char *name, const char *default);
long getenv_long(const char *name, long default);

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

Successfully merging this pull request may close these issues.

3 participants