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

[GTS] Set jdbc user based on gts user in GSQL #225

Closed
anishanainani opened this issue Apr 17, 2020 · 0 comments · Fixed by #229
Closed

[GTS] Set jdbc user based on gts user in GSQL #225

anishanainani opened this issue Apr 17, 2020 · 0 comments · Fixed by #229

Comments

@anishanainani
Copy link
Contributor

What feature are your requesting?
As GTS starts a spark session with a default username and allow other users to query with their own usernames, we need to check actual spark user in the code for authentication and logging purposes.
Thats why, we set the JDBC user to actual spark user to set the query band for authentication.

What benefits do you foresee from the feature you are requesting?
User can set their own default user for the GTS in order to make checks in the code.

Potential solution/ideas?

Additional context

anishanainani added a commit to anishanainani/gimel that referenced this issue Apr 17, 2020
anishanainani pushed a commit to anishanainani/gimel that referenced this issue Apr 17, 2020
Dee-Pac pushed a commit that referenced this issue Apr 20, 2020
Make sure you have checked all steps below.

### GitHub Issue
Fixes #225 


### Checklist:
<!--- Go over all the following points. Check boxes that apply to this pull request -->
- [x] This pull request updates the documentation
- [ ] This pull request changes library dependencies
- [x] Title of the PR is of format (example) : [#25][Github] Add Pull Request Template

<!-- NOTE: lines that start with < - - ! and end with - - > are comments and will be ignored. -->
<!-- Please include the GitHub issue number in the PR title above. If an issue does not exist, please create one.-->
<!-- Example:[#25][Github] Add Pull Request Template where [#25 refers to #25] -->

### What is the purpose of this pull request?
As GTS starts a spark session with a default username and allow other users to query with their own usernames, we need to check actual spark user in the code for authentication and logging purposes.
Thats why, we set the JDBC user to actual spark user to set the query band for authentication.

In this PR, the gts default user is made configurable by passing the username to spark.gimel.gts.default.user conf in the startup script.

### How was this change validated?


### Commit Guidelines
- [x] My commits all reference GH issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"
anishanainani added a commit to anishanainani/gimel that referenced this issue Apr 27, 2020
Make sure you have checked all steps below.

### GitHub Issue
Fixes paypal#225 


### Checklist:
<!--- Go over all the following points. Check boxes that apply to this pull request -->
- [x] This pull request updates the documentation
- [ ] This pull request changes library dependencies
- [x] Title of the PR is of format (example) : [paypal#25][Github] Add Pull Request Template

<!-- NOTE: lines that start with < - - ! and end with - - > are comments and will be ignored. -->
<!-- Please include the GitHub issue number in the PR title above. If an issue does not exist, please create one.-->
<!-- Example:[paypal#25][Github] Add Pull Request Template where [paypal#25 refers to paypal#25] -->

### What is the purpose of this pull request?
As GTS starts a spark session with a default username and allow other users to query with their own usernames, we need to check actual spark user in the code for authentication and logging purposes.
Thats why, we set the JDBC user to actual spark user to set the query band for authentication.

In this PR, the gts default user is made configurable by passing the username to spark.gimel.gts.default.user conf in the startup script.

### How was this change validated?


### Commit Guidelines
- [x] My commits all reference GH issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"
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 a pull request may close this issue.

1 participant