You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/02 21:01:00 UTC

[jira] [Work logged] (KNOX-2600) Configure PostgreSQL datasource with JDBC URL

     [ https://issues.apache.org/jira/browse/KNOX-2600?focusedWorklogId=592049&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-592049 ]

ASF GitHub Bot logged work on KNOX-2600:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/May/21 21:00
            Start Date: 02/May/21 21:00
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request #444:
URL: https://github.com/apache/knox/pull/444


   ## What changes were proposed in this pull request?
   
   Instead of declaring connection properties one-by-one in `gateway-site.xml` a simple `connection URL` is enough to create connections to PostgreSQL DB server.
   
   ## How was this patch tested?
   
   Updated and ran JUnit tests as well as executing the following manual test steps:
   1. Configured the Knox Gateway as follows and started it successfully
   ```
       <property>
           <name>gateway.service.tokenstate.impl</name>
           <value>org.apache.knox.gateway.services.token.impl.JDBCTokenStateService</value>
       </property>
        <property>
           <name>gateway.database.type</name>
           <value>postgresql</value>
       </property>
       <property>
           <name>gateway.database.connection.url</name>
           <value>jdbc:postgresql://smolnar-MBP15.local:5432/postgres?user=postgres&amp;ssl=true&amp;sslmode=verify-full&amp;sslrootcert=/usr/local/var/postgresql@10/data/root.crt</value>
       </property>
   ```
   2. Generated some tokens with our `tokengen` application
   3. Confirmed that the tokens were successfully saved in my local PostgreSQL DB


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 592049)
    Remaining Estimate: 0h
            Time Spent: 10m

> Configure PostgreSQL datasource with JDBC URL
> ---------------------------------------------
>
>                 Key: KNOX-2600
>                 URL: https://issues.apache.org/jira/browse/KNOX-2600
>             Project: Apache Knox
>          Issue Type: Improvement
>    Affects Versions: 1.6.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When {{gateway.database.type}} is set to {{postgreql}}, there are a bunch of connection parameters that have to be declared too so that the Knox Gateway can connect to a Postgre SQL server.
> Instead of declaring these connection parameters one-by-one, a generic JDBC URL could be declared in {{gateway-site.xml}}. If this configuration has any value, the Knox Gateway will parse and use it to create the Datasource object.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)