[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 22:35
Start Date: 25/Feb/20 22:35
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384168240
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -310,4 +325,30 @@ protected boolean needsEviction(final String token) 
throws UnknownTokenException
 return tokenExpirations.keySet().stream().collect(Collectors.toList());
   }
 
+  /**
+   * A function that returns the JWT token expiration. This is only called when
+   * gateway.knox.token.permissive.failure.enabled property is set to true.
+   *
+   * @param token token to be verified and saved
+   */
+  protected long getJWTTokenExpiration(final String token) {
+if (!isValidIdentifier(token)) {
+  throw new IllegalArgumentException("Token data cannot be null.");
+}
+JWT jwt;
+try {
+  jwt = new JWTToken(token);
+} catch (final ParseException e) {
+  log.errorParsingToken(e.toString());
+  throw new IllegalArgumentException(e);
 
 Review comment:
   True, that would be ugly, but we only throw two types of exceptions here 
`UnknownTokenException ` and `IllegalArgumentException`. `ParseException` is 
not a Runtime exception so we need to wrap it up in one of the two types, which 
leaves us with `IllegalArgumentException`. The stack trace will atleast let 
users know what the original error was.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 393013)
Time Spent: 1h  (was: 50m)

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[GitHub] [knox] moresandeep commented on a change in pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #274: KNOX-2212 - Token 
permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384168240
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -310,4 +325,30 @@ protected boolean needsEviction(final String token) 
throws UnknownTokenException
 return tokenExpirations.keySet().stream().collect(Collectors.toList());
   }
 
+  /**
+   * A function that returns the JWT token expiration. This is only called when
+   * gateway.knox.token.permissive.failure.enabled property is set to true.
+   *
+   * @param token token to be verified and saved
+   */
+  protected long getJWTTokenExpiration(final String token) {
+if (!isValidIdentifier(token)) {
+  throw new IllegalArgumentException("Token data cannot be null.");
+}
+JWT jwt;
+try {
+  jwt = new JWTToken(token);
+} catch (final ParseException e) {
+  log.errorParsingToken(e.toString());
+  throw new IllegalArgumentException(e);
 
 Review comment:
   True, that would be ugly, but we only throw two types of exceptions here 
`UnknownTokenException ` and `IllegalArgumentException`. `ParseException` is 
not a Runtime exception so we need to wrap it up in one of the two types, which 
leaves us with `IllegalArgumentException`. The stack trace will atleast let 
users know what the original error was.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] moresandeep commented on a change in pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #274: KNOX-2212 - Token 
permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384164524
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -118,9 +125,17 @@ public void addToken(final String token,
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
 
 Review comment:
   I mean we could move this one level up and include it in a different 
function.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 22:26
Start Date: 25/Feb/20 22:26
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384164524
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -118,9 +125,17 @@ public void addToken(final String token,
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
 
 Review comment:
   I mean we could move this one level up and include it in a different 
function.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 393010)
Time Spent: 50m  (was: 40m)

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 22:23
Start Date: 25/Feb/20 22:23
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384162938
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/AliasBasedTokenStateService.java
 ##
 @@ -92,9 +93,17 @@ protected long getMaxLifetime(final String token) {
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration = 0;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
+  .containsIgnoreCase(e.toString(), "Unknown token")) {
 
 Review comment:
   Because this is how the validate() function let's you know that the 
TokenStateService does not have the token, by throwing UnknownTokenException.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 393008)
Time Spent: 40m  (was: 0.5h)

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[GitHub] [knox] moresandeep commented on a change in pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #274: KNOX-2212 - Token 
permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384162938
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/AliasBasedTokenStateService.java
 ##
 @@ -92,9 +93,17 @@ protected long getMaxLifetime(final String token) {
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration = 0;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
+  .containsIgnoreCase(e.toString(), "Unknown token")) {
 
 Review comment:
   Because this is how the validate() function let's you know that the 
TokenStateService does not have the token, by throwing UnknownTokenException.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Updated] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Kevin Risden (Jira)


 [ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Risden updated KNOX-2221:
---
Status: In Progress  (was: Patch Available)

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Work logged] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2221:


Author: ASF GitHub Bot
Created on: 25/Feb/20 21:23
Start Date: 25/Feb/20 21:23
Worklog Time Spent: 10m 
  Work Description: risdenk commented on issue #271: KNOX-2221 - Upgrade 
shiro to 1.5.1
URL: https://github.com/apache/knox/pull/271#issuecomment-591076053
 
 
   So I'm going to close this and not submit it. There are failures that are 
caught by the release tests that aren't caught here.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392944)
Time Spent: 20m  (was: 10m)

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Work logged] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2221:


Author: ASF GitHub Bot
Created on: 25/Feb/20 21:23
Start Date: 25/Feb/20 21:23
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #271: KNOX-2221 - 
Upgrade shiro to 1.5.1
URL: https://github.com/apache/knox/pull/271
 
 
   
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392945)
Time Spent: 0.5h  (was: 20m)

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[GitHub] [knox] risdenk commented on a change in pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
risdenk commented on a change in pull request #274: KNOX-2212 - Token 
permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384133911
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -310,4 +325,30 @@ protected boolean needsEviction(final String token) 
throws UnknownTokenException
 return tokenExpirations.keySet().stream().collect(Collectors.toList());
   }
 
+  /**
+   * A function that returns the JWT token expiration. This is only called when
+   * gateway.knox.token.permissive.failure.enabled property is set to true.
+   *
+   * @param token token to be verified and saved
+   */
+  protected long getJWTTokenExpiration(final String token) {
+if (!isValidIdentifier(token)) {
+  throw new IllegalArgumentException("Token data cannot be null.");
+}
+JWT jwt;
+try {
+  jwt = new JWTToken(token);
+} catch (final ParseException e) {
+  log.errorParsingToken(e.toString());
+  throw new IllegalArgumentException(e);
 
 Review comment:
   So this throws a new exception? Where does this exception end up going? I 
think this will convert an `UnknownTokenException` to a runtime 
`IllegalArgumentException` and so this will cause weird failures up the stack?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 21:22
Start Date: 25/Feb/20 21:22
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384133140
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -118,9 +125,17 @@ public void addToken(final String token,
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
 
 Review comment:
   We do the exact same thing twice? Why?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392943)
Time Spent: 0.5h  (was: 20m)

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[GitHub] [knox] risdenk commented on issue #271: KNOX-2221 - Upgrade shiro to 1.5.1

2020-02-25 Thread GitBox
risdenk commented on issue #271: KNOX-2221 - Upgrade shiro to 1.5.1
URL: https://github.com/apache/knox/pull/271#issuecomment-591076053
 
 
   So I'm going to close this and not submit it. There are failures that are 
caught by the release tests that aren't caught here.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] risdenk commented on a change in pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
risdenk commented on a change in pull request #274: KNOX-2212 - Token 
permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384132552
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/AliasBasedTokenStateService.java
 ##
 @@ -92,9 +93,17 @@ protected long getMaxLifetime(final String token) {
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration = 0;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
+  .containsIgnoreCase(e.toString(), "Unknown token")) {
 
 Review comment:
   What? We catch an `UnknownTokenException` and then are doing a string check 
on the error message? Why?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 21:22
Start Date: 25/Feb/20 21:22
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384133911
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -310,4 +325,30 @@ protected boolean needsEviction(final String token) 
throws UnknownTokenException
 return tokenExpirations.keySet().stream().collect(Collectors.toList());
   }
 
+  /**
+   * A function that returns the JWT token expiration. This is only called when
+   * gateway.knox.token.permissive.failure.enabled property is set to true.
+   *
+   * @param token token to be verified and saved
+   */
+  protected long getJWTTokenExpiration(final String token) {
+if (!isValidIdentifier(token)) {
+  throw new IllegalArgumentException("Token data cannot be null.");
+}
+JWT jwt;
+try {
+  jwt = new JWTToken(token);
+} catch (final ParseException e) {
+  log.errorParsingToken(e.toString());
+  throw new IllegalArgumentException(e);
 
 Review comment:
   So this throws a new exception? Where does this exception end up going? I 
think this will convert an `UnknownTokenException` to a runtime 
`IllegalArgumentException` and so this will cause weird failures up the stack?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392941)
Time Spent: 20m  (was: 10m)

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[GitHub] [knox] risdenk commented on a change in pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
risdenk commented on a change in pull request #274: KNOX-2212 - Token 
permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384133140
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenStateService.java
 ##
 @@ -118,9 +125,17 @@ public void addToken(final String token,
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
 
 Review comment:
   We do the exact same thing twice? Why?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 21:22
Start Date: 25/Feb/20 21:22
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274#discussion_r384132552
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/AliasBasedTokenStateService.java
 ##
 @@ -92,9 +93,17 @@ protected long getMaxLifetime(final String token) {
   @Override
   public long getTokenExpiration(final String token) throws 
UnknownTokenException {
 long expiration = 0;
-
-validateToken(token);
-
+try {
+  validateToken(token);
+} catch (final UnknownTokenException e) {
+  /* if token permissiveness is enabled we check JWT token expiration when 
the token state is unknown */
+  if (permissiveFailureEnabled && StringUtils
+  .containsIgnoreCase(e.toString(), "Unknown token")) {
 
 Review comment:
   What? We catch an `UnknownTokenException` and then are doing a string check 
on the error message? Why?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392942)
Time Spent: 20m  (was: 10m)

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[GitHub] [knox] risdenk closed pull request #271: KNOX-2221 - Upgrade shiro to 1.5.1

2020-02-25 Thread GitBox
risdenk closed pull request #271: KNOX-2221 - Upgrade shiro to 1.5.1
URL: https://github.com/apache/knox/pull/271
 
 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Updated] (KNOX-2232) Document Knox Token options

2020-02-25 Thread Sandeep More (Jira)


 [ 
https://issues.apache.org/jira/browse/KNOX-2232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sandeep More updated KNOX-2232:
---
Description: 
KNOX-2214 and KNOX-2212 added few options to manage token eviction that needs 
to be documented

 
{noformat}
 
         
 gateway.knox.token.eviction.interval         
          
  60 

{noformat}
 
{noformat}
 
         
gateway.knox.token.eviction.grace.period         
         
60 

{noformat}
 
{noformat}
 

gateway.knox.token.permissive.failure.enabled
true
Enable token permissiveness.

{noformat}
 

  was:
KNOX-2214 added few options to manage token eviction that needs to be documented

 
{noformat}
 
         
 gateway.knox.token.eviction.interval         
          
  60 

{noformat}
 
{noformat}
 
         
gateway.knox.token.eviction.grace.period         
         
60 

{noformat}
 

 


> Document Knox Token options
> ---
>
> Key: KNOX-2232
> URL: https://issues.apache.org/jira/browse/KNOX-2232
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Site
>Affects Versions: 1.4.0
>Reporter: Sandeep More
>Assignee: Sandeep More
>Priority: Major
>
> KNOX-2214 and KNOX-2212 added few options to manage token eviction that needs 
> to be documented
>  
> {noformat}
>  
>          
>  gateway.knox.token.eviction.interval         
>           
>   60 
> 
> {noformat}
>  
> {noformat}
>  
>          
> gateway.knox.token.eviction.grace.period         
>          
> 60 
> 
> {noformat}
>  
> {noformat}
>  
> 
> gateway.knox.token.permissive.failure.enabled
> true
> Enable token permissiveness.
> 
> {noformat}
>  



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


[jira] [Work started] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread Sandeep More (Jira)


 [ 
https://issues.apache.org/jira/browse/KNOX-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on KNOX-2212 started by Sandeep More.
--
> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[jira] [Work logged] (KNOX-2212) TokenStateService should fail permissively

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2212:


Author: ASF GitHub Bot
Created on: 25/Feb/20 21:13
Start Date: 25/Feb/20 21:13
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #274: KNOX-2212 - 
Token permissiveness
URL: https://github.com/apache/knox/pull/274
 
 
   ## What changes were proposed in this pull request?
   
   When `gateway.knox.token.permissive.failure.enabled`  property is set to 
true in gateway-site.xml (by default it is false) **and** 
`knox.token.exp.server-managed` is set to true in the descriptor (server 
managed token state is enabled) then, when Knox encounters a valid token which 
is not stored in it's token state Knox uses the expiry date of the JWT token 
instead of flagging it as "Unknown Token"
   
   ## How was this patch tested?
   This patch was locally tested
 

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:
us...@infra.apache.org


Issue Time Tracking
---

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

> TokenStateService should fail permissively
> --
>
> Key: KNOX-2212
> URL: https://issues.apache.org/jira/browse/KNOX-2212
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.4.0
>Reporter: Philip Zampino
>Assignee: Sandeep More
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> While unlikely, it's possible that the TokenStateService may be presented 
> with a token, for which it has no state, but which can be verified as a valid 
> (origin, expiration, etc...) token. In these cases, rather than rejecting the 
> token for lack of server-managed state, the token's state should be recorded, 
> and the associated operation permitted.



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


[GitHub] [knox] moresandeep opened a new pull request #274: KNOX-2212 - Token permissiveness

2020-02-25 Thread GitBox
moresandeep opened a new pull request #274: KNOX-2212 - Token permissiveness
URL: https://github.com/apache/knox/pull/274
 
 
   ## What changes were proposed in this pull request?
   
   When `gateway.knox.token.permissive.failure.enabled`  property is set to 
true in gateway-site.xml (by default it is false) **and** 
`knox.token.exp.server-managed` is set to true in the descriptor (server 
managed token state is enabled) then, when Knox encounters a valid token which 
is not stored in it's token state Knox uses the expiry date of the JWT token 
instead of flagging it as "Unknown Token"
   
   ## How was this patch tested?
   This patch was locally tested


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:45
Start Date: 25/Feb/20 19:45
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384086345
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/ambari/0.2.2.0/service.xml
 ##
 @@ -15,6 +15,12 @@
limitations under the License.
 -->
 
+
+API
+/ambari/api
 
 Review comment:
   Created a JIRA so we can use `context` in routes 
   https://issues.apache.org/jira/browse/KNOX-2252
   
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392876)
Time Spent: 10h 20m  (was: 10h 10m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 10h 20m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384086345
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/ambari/0.2.2.0/service.xml
 ##
 @@ -15,6 +15,12 @@
limitations under the License.
 -->
 
+
+API
+/ambari/api
 
 Review comment:
   Created a JIRA so we can use `context` in routes 
   https://issues.apache.org/jira/browse/KNOX-2252
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Created] (KNOX-2252) Use newly added `context` to calculate the routes in service.xml

2020-02-25 Thread Sandeep More (Jira)
Sandeep More created KNOX-2252:
--

 Summary: Use newly added `context` to calculate the routes in 
service.xml
 Key: KNOX-2252
 URL: https://issues.apache.org/jira/browse/KNOX-2252
 Project: Apache Knox
  Issue Type: Improvement
  Components: Server
Reporter: Sandeep More
Assignee: Sandor Molnar
 Fix For: 1.5.0


As part of KNOX-2226 we added a new `context` to service model. Currently this 
does not do much, it would be very useful if we can use this context to 
calculate the routes for service definitions. This would make creating services 
easy and less error prone.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384082682
 
 

 ##
 File path: 
knox-homepage-backend/src/main/java/org/apache/knox/homepage/service/model/ServiceModel.java
 ##
 @@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.knox.homepage.service.model;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.knox.gateway.topology.Service;
+
+@XmlRootElement(name = "service")
+@XmlAccessorType(XmlAccessType.NONE)
+public class ServiceModel {
+
+  public enum Type {
+API, UI, UNKNOWN
+  };
+
+  protected HttpServletRequest request;
+  protected String topologyName;
+  protected String gatewayPath;
+  protected Service service;
+
+  public void setRequest(HttpServletRequest request) {
+this.request = request;
+  }
+
+  public void setTopologyName(String topologyName) {
+this.topologyName = topologyName;
+  }
+
+  public void setGatewayPath(String gatewayPath) {
+this.gatewayPath = gatewayPath;
+  }
+
+  public void setService(Service service) {
+this.service = service;
+  }
+
 
 Review comment:
   +1


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:38
Start Date: 25/Feb/20 19:38
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384082682
 
 

 ##
 File path: 
knox-homepage-backend/src/main/java/org/apache/knox/homepage/service/model/ServiceModel.java
 ##
 @@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.knox.homepage.service.model;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.knox.gateway.topology.Service;
+
+@XmlRootElement(name = "service")
+@XmlAccessorType(XmlAccessType.NONE)
+public class ServiceModel {
+
+  public enum Type {
+API, UI, UNKNOWN
+  };
+
+  protected HttpServletRequest request;
+  protected String topologyName;
+  protected String gatewayPath;
+  protected Service service;
+
+  public void setRequest(HttpServletRequest request) {
+this.request = request;
+  }
+
+  public void setTopologyName(String topologyName) {
+this.topologyName = topologyName;
+  }
+
+  public void setGatewayPath(String gatewayPath) {
+this.gatewayPath = gatewayPath;
+  }
+
+  public void setService(Service service) {
+this.service = service;
+  }
+
 
 Review comment:
   +1
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392874)
Time Spent: 10h 10m  (was: 10h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 10h 10m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:31
Start Date: 25/Feb/20 19:31
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384078859
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   As discussed this is OK.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392869)
Time Spent: 9h 50m  (was: 9h 40m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 9h 50m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:31
Start Date: 25/Feb/20 19:31
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384078781
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   As discussed this is OK.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392868)
Time Spent: 9h 40m  (was: 9.5h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 9h 40m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:31
Start Date: 25/Feb/20 19:31
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384078930
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   As discussed this is OK.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392870)
Time Spent: 10h  (was: 9h 50m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 10h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384078930
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   As discussed this is OK.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384078859
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   As discussed this is OK.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384078781
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   As discussed this is OK.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384075719
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/ambari/0.2.2.0/service.xml
 ##
 @@ -15,6 +15,12 @@
limitations under the License.
 -->
 
+
+API
+/ambari/api
 
 Review comment:
   I know it's redundant but it's easier to add it in the metadata than parsing 
the `route` elements.
   It's useful to know what comes after `$KNOX_URL/$GATEWAY_PATH/`


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:25
Start Date: 25/Feb/20 19:25
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384075719
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/ambari/0.2.2.0/service.xml
 ##
 @@ -15,6 +15,12 @@
limitations under the License.
 -->
 
+
+API
+/ambari/api
 
 Review comment:
   I know it's redundant but it's easier to add it in the metadata than parsing 
the `route` elements.
   It's useful to know what comes after `$KNOX_URL/$GATEWAY_PATH/`
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392860)
Time Spent: 9.5h  (was: 9h 20m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 9.5h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:20
Start Date: 25/Feb/20 19:20
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384072895
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   Renamed the module as discussed above.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392859)
Time Spent: 9h 20m  (was: 9h 10m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 9h 20m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:20
Start Date: 25/Feb/20 19:20
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384072700
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   Fixed:
   - setting `gatewayPath` in its own method
   - removed the `commons-lang3` dependency
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392858)
Time Spent: 9h 10m  (was: 9h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 9h 10m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384072895
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   Renamed the module as discussed above.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384072700
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   Fixed:
   - setting `gatewayPath` in its own method
   - removed the `commons-lang3` dependency


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:17
Start Date: 25/Feb/20 19:17
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r378357573
 
 

 ##
 File path: 
knox-homepage-backend/src/main/java/org/apache/knox/homepage/service/model/ServiceModel.java
 ##
 @@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.knox.homepage.service.model;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.knox.gateway.topology.Service;
+
+@XmlRootElement(name = "service")
+@XmlAccessorType(XmlAccessType.NONE)
+public class ServiceModel {
+
+  public enum Type {
+API, UI, UNKNOWN
+  };
+
+  protected HttpServletRequest request;
+  protected String topologyName;
+  protected String gatewayPath;
+  protected Service service;
+
+  public void setRequest(HttpServletRequest request) {
+this.request = request;
+  }
+
+  public void setTopologyName(String topologyName) {
+this.topologyName = topologyName;
+  }
+
+  public void setGatewayPath(String gatewayPath) {
+this.gatewayPath = gatewayPath;
+  }
+
+  public void setService(Service service) {
+this.service = service;
+  }
+
 
 Review comment:
   We should also get display service version
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392849)
Time Spent: 8.5h  (was: 8h 20m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8.5h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:17
Start Date: 25/Feb/20 19:17
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r378351786
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
 ##
 @@ -923,6 +925,40 @@ private synchronized void internalActivateArchive( 
Topology topology, File warDi
 }
   }
 
+  private synchronized void activateHomeApp() {
+try {
+  // UI
+  activateHomepageContext("/home", "homepage/%2Fhome");
+
+  // API
+  activateHomepageContext("/home/api", "homepage/%2F");
+} catch (Throwable e) {
+  e.printStackTrace();
 
 Review comment:
   This might be due to WIP, but we should not be throwing stack traces.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392853)
Time Spent: 8h 50m  (was: 8h 40m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:17
Start Date: 25/Feb/20 19:17
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384065726
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   Same as above.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392852)
Time Spent: 8h 50m  (was: 8h 40m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:17
Start Date: 25/Feb/20 19:17
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383988278
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/ambari/0.2.2.0/service.xml
 ##
 @@ -15,6 +15,12 @@
limitations under the License.
 -->
 
+
+API
+/ambari/api
 
 Review comment:
   What is the use of context ? Looks like we are duplicating context here and 
in the routes elements. 
   
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392850)
Time Spent: 8h 40m  (was: 8.5h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h 40m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:17
Start Date: 25/Feb/20 19:17
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384066536
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   same as above
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392851)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h 40m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:17
Start Date: 25/Feb/20 19:17
Worklog Time Spent: 10m 
  Work Description: moresandeep commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384065569
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   why is the context path /static here shouldn't it be /cmf/static ?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392854)
Time Spent: 9h  (was: 8h 50m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 9h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383988278
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/ambari/0.2.2.0/service.xml
 ##
 @@ -15,6 +15,12 @@
limitations under the License.
 -->
 
+
+API
+/ambari/api
 
 Review comment:
   What is the use of context ? Looks like we are duplicating context here and 
in the routes elements. 
   


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384065726
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   Same as above.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r378351786
 
 

 ##
 File path: 
gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
 ##
 @@ -923,6 +925,40 @@ private synchronized void internalActivateArchive( 
Topology topology, File warDi
 }
   }
 
+  private synchronized void activateHomeApp() {
+try {
+  // UI
+  activateHomepageContext("/home", "homepage/%2Fhome");
+
+  // API
+  activateHomepageContext("/home/api", "homepage/%2F");
+} catch (Throwable e) {
+  e.printStackTrace();
 
 Review comment:
   This might be due to WIP, but we should not be throwing stack traces.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384065569
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   why is the context path /static here shouldn't it be /cmf/static ?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384066536
 
 

 ##
 File path: 
gateway-service-definitions/src/main/resources/services/cm-ui/1.0.0/rewrite.xml
 ##
 @@ -0,0 +1,33 @@
+
+
+  
+
+  
+  
+
+  
+  
+
+  
+  
+
+  
+  
 
 Review comment:
   same as above


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] moresandeep commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
moresandeep commented on a change in pull request #263: KNOX-2226 - Add home 
page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r378357573
 
 

 ##
 File path: 
knox-homepage-backend/src/main/java/org/apache/knox/homepage/service/model/ServiceModel.java
 ##
 @@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.knox.homepage.service.model;
+
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.knox.gateway.topology.Service;
+
+@XmlRootElement(name = "service")
+@XmlAccessorType(XmlAccessType.NONE)
+public class ServiceModel {
+
+  public enum Type {
+API, UI, UNKNOWN
+  };
+
+  protected HttpServletRequest request;
+  protected String topologyName;
+  protected String gatewayPath;
+  protected Service service;
+
+  public void setRequest(HttpServletRequest request) {
+this.request = request;
+  }
+
+  public void setTopologyName(String topologyName) {
+this.topologyName = topologyName;
+  }
+
+  public void setGatewayPath(String gatewayPath) {
+this.gatewayPath = gatewayPath;
+  }
+
+  public void setService(Service service) {
+this.service = service;
+  }
+
 
 Review comment:
   We should also get display service version


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-1654) Ability to exclude global rewrite rules

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-1654:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:15
Start Date: 25/Feb/20 19:15
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on issue #196: KNOX-1654 - Ability 
to exclude services to apply global rewrite rules
URL: https://github.com/apache/knox/pull/196#issuecomment-591020280
 
 
   @risdenk,
   
   last time I checked there was no common agreement on this feature in the 
JIRA (this is still true). I see the following two options:
   - either closing this one and the JIRA as `Won't do`
   - or merging this PR and resolve the JIRA
   
   Cc. @lmccay, @moresandeep 
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392848)
Time Spent: 40m  (was: 0.5h)

> Ability to exclude global rewrite rules 
> 
>
> Key: KNOX-1654
> URL: https://issues.apache.org/jira/browse/KNOX-1654
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Reporter: Sandeep More
>Assignee: Sandor Molnar
>Priority: Major
> Fix For: 1.4.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently we have some services whose rewrite rules are global, the 
> configuration is in gateway-site.xml. We need to be able to add a list of 
> services that can be excluded so that global rules do not affect them.
>  



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


[GitHub] [knox] smolnar82 commented on issue #196: KNOX-1654 - Ability to exclude services to apply global rewrite rules

2020-02-25 Thread GitBox
smolnar82 commented on issue #196: KNOX-1654 - Ability to exclude services to 
apply global rewrite rules
URL: https://github.com/apache/knox/pull/196#issuecomment-591020280
 
 
   @risdenk,
   
   last time I checked there was no common agreement on this feature in the 
JIRA (this is still true). I see the following two options:
   - either closing this one and the JIRA as `Won't do`
   - or merging this PR and resolve the JIRA
   
   Cc. @lmccay, @moresandeep 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 19:03
Start Date: 25/Feb/20 19:03
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383927754
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   > This should be its own method
   
   +1 (let me wait a bit for other review comments before submitting a new 
patchset)
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392838)
Time Spent: 8h 20m  (was: 8h 10m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h 20m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383927754
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   > This should be its own method
   
   +1 (let me wait a bit for other review comments before submitting a new 
patchset)


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 17:39
Start Date: 25/Feb/20 17:39
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384022768
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   https://issues.apache.org/jira/browse/KNOX-2251
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392712)
Time Spent: 8h 10m  (was: 8h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384022768
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   https://issues.apache.org/jira/browse/KNOX-2251


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 17:34
Start Date: 25/Feb/20 17:34
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384022628
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   https://issues.apache.org/jira/browse/KNOX-2251
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392706)
Time Spent: 8h  (was: 7h 50m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 8h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r384022628
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   https://issues.apache.org/jira/browse/KNOX-2251


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Created] (KNOX-2251) Replace XML topologies with provider/descriptor pairs

2020-02-25 Thread Sandor Molnar (Jira)
Sandor Molnar created KNOX-2251:
---

 Summary: Replace XML topologies with provider/descriptor pairs
 Key: KNOX-2251
 URL: https://issues.apache.org/jira/browse/KNOX-2251
 Project: Apache Knox
  Issue Type: Improvement
  Components: Server
Affects Versions: 1.4.0
Reporter: Sandor Molnar
Assignee: Sandor Molnar


Consider moving existing topologies (manager, admin, etc...) to 
provider/descriptor pairs pointing to {{default-providers.json}}.



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


[jira] [Commented] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Brian Demers (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044636#comment-17044636
 ] 

Brian Demers commented on KNOX-2221:


Thanks!

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Commented] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Kevin Risden (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044632#comment-17044632
 ] 

Kevin Risden commented on KNOX-2221:


[~bdemers] here is where the xml config gets converted:

https://github.com/apache/knox/blob/master/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/deploy/impl/ShiroDeploymentContributor.java#L88

and 

https://github.com/apache/knox/blob/master/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/deploy/impl/ShiroConfig.java

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Commented] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Brian Demers (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044627#comment-17044627
 ] 

Brian Demers commented on KNOX-2221:


Sounds like there is an issue on the Shiro side too, but... Knox probably 
doesn't need to use an intermediate INI object, so I wanted to take a look at 
that too (two separate issues, mostly)

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Commented] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Kevin Risden (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044623#comment-17044623
 ] 

Kevin Risden commented on KNOX-2221:


Well if it helps, I tracked it down into Ini.java due to the change in 
SHIRO-684. The XML ends up creating a line in the ini like:

{code:java}
main.ldapRealm.principalRegex=(.*?)\\(.*)
{code}

The Ini class ends up stripping out the two backslashes. 

I'm not sure where the XML gets converted into the ini file.

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 16:13
Start Date: 25/Feb/20 16:13
Worklog Time Spent: 10m 
  Work Description: lmccay commented on pull request #263: KNOX-2226 - Add 
home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383981952
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   I see that the metadata.xml topology is aligned with other existing 
topologies like admin.xml for instance. I think that we need to consider moving 
these to descriptors that point to the default-providers.json shared provider 
config. This way the authentication can be changed in one place. Admin will 
require an authorization provider but since it is for the admin service and not 
others that should be okay. Let's not block this PR and follow up with another 
to move to descriptors. Just wanted to mention it here.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392667)
Time Spent: 7h 50m  (was: 7h 40m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 7h 50m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Commented] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Brian Demers (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044615#comment-17044615
 ] 

Brian Demers commented on KNOX-2221:


Can someone point me to the code that translates the XML into INI?

(We will look at it from the Shiro side too)

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[GitHub] [knox] lmccay commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
lmccay commented on a change in pull request #263: KNOX-2226 - Add home page to 
Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383981952
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   I see that the metadata.xml topology is aligned with other existing 
topologies like admin.xml for instance. I think that we need to consider moving 
these to descriptors that point to the default-providers.json shared provider 
config. This way the authentication can be changed in one place. Admin will 
require an authorization provider but since it is for the admin service and not 
others that should be okay. Let's not block this PR and follow up with another 
to move to descriptors. Just wanted to mention it here.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 16:11
Start Date: 25/Feb/20 16:11
Worklog Time Spent: 10m 
  Work Description: pzampino commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383980572
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   Sounds good to me. I was unaware of the client downloads bit.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392665)
Time Spent: 7h 40m  (was: 7.5h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 7h 40m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] pzampino commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
pzampino commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383980572
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   Sounds good to me. I was unaware of the client downloads bit.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (KNOX-2139) Can not handle 8GB file when using webhdfs

2020-02-25 Thread Kevin Risden (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044609#comment-17044609
 ] 

Kevin Risden commented on KNOX-2139:


Without a reproduction locally yet, my guess is around Transfer-Encoding: 
chunked and that makes Content-Length: 0 on purpose. Not sure what triggers 
this, but either way need to reproduce this and figure out what all is 
happening.

> Can not handle 8GB file when using webhdfs
> --
>
> Key: KNOX-2139
> URL: https://issues.apache.org/jira/browse/KNOX-2139
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.1.0, 1.2.0
>Reporter: Sean Chow
>Priority: Critical
>
> I use knox with webhdfs for a long time, andI uprade my knox version from 0.8 
> to 1.2 recent days. It's really strange that knox can't handle file with size 
> *8589934592 bytes* when I upload my splited file to hdfs.
> It's easy to reproduce and both knox1.1 and 1.2 have this issue. But is works 
> fine in knox0.8.
> Any error log found in gateway.log? No, all logs is clean. From the client 
> side (curl), I saw the the url is redirected correctly and failed with 
> {{curl: (55) Send failure: Connection reset by peer}} or {{curl: (55) Send 
> failure: Broken pipe}}
> I'm sure my network is ok. Any files with other size(smaller or larger) can 
> be  upload successfully.



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


[jira] [Commented] (KNOX-2221) Upgrade shiro to 1.5.1

2020-02-25 Thread Colm O hEigeartaigh (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044589#comment-17044589
 ] 

Colm O hEigeartaigh commented on KNOX-2221:
---

[~krisden] Can you provide this feedback on 
https://issues.apache.org/jira/browse/SHIRO-684 ?

> Upgrade shiro to 1.5.1
> --
>
> Key: KNOX-2221
> URL: https://issues.apache.org/jira/browse/KNOX-2221
> Project: Apache Knox
>  Issue Type: Sub-task
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Major
> Fix For: 1.4.0
>
> Attachments: log.txt.gz
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Note:* Can't upgrade to shiro 1.5.0 due to a bug in handling `/` only from 
> SHIRO-682. Will need to wait for a new version of Shiro to upgrade.
> Upgrade shiro 1.4.2 to 1.5.1
> Shiro 1.5.0 release notes: 
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310950=12344991



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


[jira] [Commented] (KNOX-2139) Can not handle 8GB file when using webhdfs

2020-02-25 Thread Kevin Risden (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044588#comment-17044588
 ] 

Kevin Risden commented on KNOX-2139:


So taking a quick look through the code, contentLength comes straight from the 
the HttpServletRequest.

{code:java}
int contentLength = request.getContentLength();
{code}

So it is being set to 0 somewhere higher up the stack. I looked through the 
code for other implementations of "getContentLength" as well as 
"setContentLength". I don't see where Knox is setting the content length 
explicitly to 0 off hand. I'll have to try to reproduce this and hook up a 
debugger to see what is messing with the contentLength.

> Can not handle 8GB file when using webhdfs
> --
>
> Key: KNOX-2139
> URL: https://issues.apache.org/jira/browse/KNOX-2139
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.1.0, 1.2.0
>Reporter: Sean Chow
>Priority: Critical
>
> I use knox with webhdfs for a long time, andI uprade my knox version from 0.8 
> to 1.2 recent days. It's really strange that knox can't handle file with size 
> *8589934592 bytes* when I upload my splited file to hdfs.
> It's easy to reproduce and both knox1.1 and 1.2 have this issue. But is works 
> fine in knox0.8.
> Any error log found in gateway.log? No, all logs is clean. From the client 
> side (curl), I saw the the url is redirected correctly and failed with 
> {{curl: (55) Send failure: Connection reset by peer}} or {{curl: (55) Send 
> failure: Broken pipe}}
> I'm sure my network is ok. Any files with other size(smaller or larger) can 
> be  upload successfully.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383944969
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   The idea is to add `KnoxShell/Client Downloads and docs` later on into the 
`General Proxy Information` block, but it's been scoped out for now.
   I gave a second thought about the module names and I think the UI should be 
kept as-is (`knox-homepage-ui`) because of the `General Proxy Information` 
block. However, the back-end module can - and should - be renamed like 
`gateway-service-metadata`.
   What do you think?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 15:18
Start Date: 25/Feb/20 15:18
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383944969
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   The idea is to add `KnoxShell/Client Downloads and docs` later on into the 
`General Proxy Information` block, but it's been scoped out for now.
   I gave a second thought about the module names and I think the UI should be 
kept as-is (`knox-homepage-ui`) because of the `General Proxy Information` 
block. However, the back-end module can - and should - be renamed like 
`gateway-service-metadata`.
   What do you think?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392619)
Time Spent: 7.5h  (was: 7h 20m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 15:12
Start Date: 25/Feb/20 15:12
Worklog Time Spent: 10m 
  Work Description: pzampino commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383940886
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   While some of the information supports the client pieces, I still feel that 
the information is all about the gateway. I could be persuaded otherwise, but 
this is my feeling at this point.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392617)
Time Spent: 7h 20m  (was: 7h 10m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 7h 20m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] pzampino commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
pzampino commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383940886
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   While some of the information supports the client pieces, I still feel that 
the information is all about the gateway. I could be persuaded otherwise, but 
this is my feeling at this point.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 15:06
Start Date: 25/Feb/20 15:06
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383936897
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   I think it expresses more that they belong to Knox as a product, including 
the gateway, the CLI, the KnoxShell rather than referring only the gateway part.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392615)
Time Spent: 7h 10m  (was: 7h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 7h 10m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383936897
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   I think it expresses more that they belong to Knox as a product, including 
the gateway, the CLI, the KnoxShell rather than referring only the gateway part.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (KNOX-2139) Can not handle 8GB file when using webhdfs

2020-02-25 Thread Kevin Risden (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044551#comment-17044551
 ] 

Kevin Risden commented on KNOX-2139:


Sorry [~seanlook] I don't know how I lost track of this. I'll try to get to it 
this week.

> Can not handle 8GB file when using webhdfs
> --
>
> Key: KNOX-2139
> URL: https://issues.apache.org/jira/browse/KNOX-2139
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Affects Versions: 1.1.0, 1.2.0
>Reporter: Sean Chow
>Priority: Critical
>
> I use knox with webhdfs for a long time, andI uprade my knox version from 0.8 
> to 1.2 recent days. It's really strange that knox can't handle file with size 
> *8589934592 bytes* when I upload my splited file to hdfs.
> It's easy to reproduce and both knox1.1 and 1.2 have this issue. But is works 
> fine in knox0.8.
> Any error log found in gateway.log? No, all logs is clean. From the client 
> side (curl), I saw the the url is redirected correctly and failed with 
> {{curl: (55) Send failure: Connection reset by peer}} or {{curl: (55) Send 
> failure: Broken pipe}}
> I'm sure my network is ok. Any files with other size(smaller or larger) can 
> be  upload successfully.



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


[jira] [Updated] (KNOX-2234) Omitting cookie from outbound request header

2020-02-25 Thread Kevin Risden (Jira)


 [ 
https://issues.apache.org/jira/browse/KNOX-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Risden updated KNOX-2234:
---
Resolution: Not A Bug
Status: Resolved  (was: Patch Available)

Marking as "Not a Bug" since this is working as designed. It requires a lot 
more thought into where cookies should be removed if they are going to be 
completely removed from dispatch in Knox.

> Omitting cookie from outbound request header
> 
>
> Key: KNOX-2234
> URL: https://issues.apache.org/jira/browse/KNOX-2234
> Project: Apache Knox
>  Issue Type: Improvement
>Affects Versions: 1.2.0, 1.3.0
>Reporter: James Chen
>Priority: Minor
>  Labels: easy-fix
> Attachments: KNOX-2234.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> It is possible for an attacker to directly steal user session information by 
> having a user visit or load a URL using Knox, as cookies are forwarded in the 
> header on the outbound request. This behavior doesn't seem to serve any 
> particular function either, as the endpoint Knox tries to contact shouldn't 
> need any authentication by Knox. We suggest that user-Knox cookies should be 
> omitted from the outbound request.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383929083
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   No, it's not. Without this topology, clients (CM, Ambari, etc...) can not 
query metadata (general proxy info and topology information).
   Please note this can not be added into Admin API because there is no need to 
authorize the incoming requests.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:54
Start Date: 25/Feb/20 14:54
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383929083
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   No, it's not. Without this topology, clients (CM, Ambari, etc...) can not 
query metadata (general proxy info and topology information).
   Please note this can not be added into Admin API because there is no need to 
authorize the incoming requests.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392607)
Time Spent: 7h  (was: 6h 50m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 7h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:53
Start Date: 25/Feb/20 14:53
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383927754
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   > This should be its own method
   
   +1 (let me wait a bit until for review comments before submitting a new 
patchset)
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392605)
Time Spent: 6h 50m  (was: 6h 40m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 6h 50m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
smolnar82 commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383927754
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   > This should be its own method
   
   +1 (let me wait a bit until for review comments before submitting a new 
patchset)


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:52
Start Date: 25/Feb/20 14:52
Worklog Time Spent: 10m 
  Work Description: pzampino commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383922240
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   Why are these new modules prefixed with "knox" rather than "gateway"?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392604)
Time Spent: 6h 40m  (was: 6.5h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] pzampino commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
pzampino commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383922240
 
 

 ##
 File path: knox-homepage-backend/pom.xml
 ##
 @@ -0,0 +1,59 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.knox
+gateway
+1.4.0-SNAPSHOT
+
+
+knox-homepage-backend
 
 Review comment:
   Why are these new modules prefixed with "knox" rather than "gateway"?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:51
Start Date: 25/Feb/20 14:51
Worklog Time Spent: 10m 
  Work Description: smolnar82 commented on pull request #263: KNOX-2226 - 
Add home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383927089
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   I know you are not fan of adding new dependencies but the `commons-lang` 
dependency is in our project anyway. If you are insisting on removing it I'll 
do...
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392603)
Time Spent: 6.5h  (was: 6h 20m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 6.5h
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2126) Add an API to retrieve the public key used for Knox JWT verification

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2126:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:44
Start Date: 25/Feb/20 14:44
Worklog Time Spent: 10m 
  Work Description: risdenk commented on issue #195: KNOX-2126. Add an API 
to retrieve the public key used for Knox JWT verification.
URL: https://github.com/apache/knox/pull/195#issuecomment-590901456
 
 
   @sidseth  what is the status of this change? 
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392595)
Time Spent: 2.5h  (was: 2h 20m)

> Add an API to retrieve the public key used for Knox JWT verification
> 
>
> Key: KNOX-2126
> URL: https://issues.apache.org/jira/browse/KNOX-2126
> Project: Apache Knox
>  Issue Type: New Feature
>Reporter: Siddharth Seth
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> It can be useful to get access to the PublicKey used by Knox to verify the 
> tokens that it generates outside of Knox.



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


[jira] [Work logged] (KNOX-1654) Ability to exclude global rewrite rules

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-1654:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:44
Start Date: 25/Feb/20 14:44
Worklog Time Spent: 10m 
  Work Description: risdenk commented on issue #196: KNOX-1654 - Ability to 
exclude services to apply global rewrite rules
URL: https://github.com/apache/knox/pull/196#issuecomment-590901279
 
 
   @smolnar82 what is the status of this change?
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392594)
Time Spent: 0.5h  (was: 20m)

> Ability to exclude global rewrite rules 
> 
>
> Key: KNOX-1654
> URL: https://issues.apache.org/jira/browse/KNOX-1654
> Project: Apache Knox
>  Issue Type: Bug
>  Components: Server
>Reporter: Sandeep More
>Assignee: Sandor Molnar
>Priority: Major
> Fix For: 1.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently we have some services whose rewrite rules are global, the 
> configuration is in gateway-site.xml. We need to be able to add a list of 
> services that can be excluded so that global rules do not affect them.
>  



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


[GitHub] [knox] risdenk commented on issue #195: KNOX-2126. Add an API to retrieve the public key used for Knox JWT verification.

2020-02-25 Thread GitBox
risdenk commented on issue #195: KNOX-2126. Add an API to retrieve the public 
key used for Knox JWT verification.
URL: https://github.com/apache/knox/pull/195#issuecomment-590901456
 
 
   @sidseth  what is the status of this change? 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] risdenk commented on issue #196: KNOX-1654 - Ability to exclude services to apply global rewrite rules

2020-02-25 Thread GitBox
risdenk commented on issue #196: KNOX-1654 - Ability to exclude services to 
apply global rewrite rules
URL: https://github.com/apache/knox/pull/196#issuecomment-590901279
 
 
   @smolnar82 what is the status of this change?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:41
Start Date: 25/Feb/20 14:41
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #263: KNOX-2226 - Add 
home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383916303
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   This should be its own method
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392589)
Time Spent: 6h 10m  (was: 6h)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 6h 10m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:41
Start Date: 25/Feb/20 14:41
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #263: KNOX-2226 - Add 
home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r38391
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   Do we need `StringUtils.isBlank`? Check is not null and is not empty? That 
would remove the commons-lang3 dependency
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392590)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 6h 10m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[jira] [Work logged] (KNOX-2226) Add home page to Knox

2020-02-25 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on KNOX-2226:


Author: ASF GitHub Bot
Created on: 25/Feb/20 14:41
Start Date: 25/Feb/20 14:41
Worklog Time Spent: 10m 
  Work Description: risdenk commented on pull request #263: KNOX-2226 - Add 
home page to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383917425
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   Is this topology just an example? Does it need to be exposed by default? If 
its an example `gateway-release/home/templates/` would be a better place.
 

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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 392591)
Time Spent: 6h 20m  (was: 6h 10m)

> Add home page to Knox
> -
>
> Key: KNOX-2226
> URL: https://issues.apache.org/jira/browse/KNOX-2226
> Project: Apache Knox
>  Issue Type: New Feature
>  Components: AdminUI
>Affects Versions: 1.3.0
>Reporter: Sandor Molnar
>Assignee: Sandor Molnar
>Priority: Major
>  Labels: UI
> Fix For: 1.4.0
>
> Attachments: OnePager-Apache_Knox_Home_Page.pdf
>
>  Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> The lack of a home or landing page for Knox leaves users without a well-known 
> place to discover the URLs for the various UIs and APIs that are being 
> exposed for access by the gateway.
> This results in the need for QuickLinks in management applications like 
> Ambari and Cloudera Manager to be rewritten to express the proxied URLs. This 
> also results in the need for users to have to continue to go to these 
> management applications for end-user URLs which is often not even appropriate.
> This proposal is for adding a Home page to Apache Knox which will present the 
> various URLs in ways that are intuitive for being able to consume the proxied 
> resources.



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


[GitHub] [knox] risdenk commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
risdenk commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383917425
 
 

 ##
 File path: gateway-release/home/conf/topologies/metadata.xml
 ##
 @@ -0,0 +1,64 @@
+
 
 Review comment:
   Is this topology just an example? Does it need to be exposed by default? If 
its an example `gateway-release/home/templates/` would be a better place.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] risdenk commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
risdenk commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r38391
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   Do we need `StringUtils.isBlank`? Check is not null and is not empty? That 
would remove the commons-lang3 dependency


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [knox] risdenk commented on a change in pull request #263: KNOX-2226 - Add home page to Knox

2020-02-25 Thread GitBox
risdenk commented on a change in pull request #263: KNOX-2226 - Add home page 
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383916303
 
 

 ##
 File path: 
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
 ##
 @@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws 
ServletException {
 
 // gateway path for deriving an idp url when missing
 gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+if (StringUtils.isBlank(gatewayPath)) {
+  final GatewayConfig gatewayConfig = filterConfig.getServletContext() == 
null ? null
+  : (GatewayConfig) 
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+  if (gatewayConfig != null) {
+gatewayPath = gatewayConfig.getGatewayPath();
+  }
+}
 
 Review comment:
   This should be its own method


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:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Updated] (KNOX-2249) Add Spark 3 History Server definition

2020-02-25 Thread Kevin Risden (Jira)


 [ 
https://issues.apache.org/jira/browse/KNOX-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Risden updated KNOX-2249:
---
Issue Type: New Feature  (was: Task)

> Add Spark 3 History Server definition
> -
>
> Key: KNOX-2249
> URL: https://issues.apache.org/jira/browse/KNOX-2249
> Project: Apache Knox
>  Issue Type: New Feature
>Reporter: Vladislav Glinskiy
>Assignee: Vladislav Glinskiy
>Priority: Major
> Fix For: 1.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Add Spark 3 History Server(HS) definition. Spark 3 HS could be run alongside 
> Spark 2 HS, so separate service definition is required.



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


[jira] [Updated] (KNOX-2249) Add Spark 3 History Server definition

2020-02-25 Thread Kevin Risden (Jira)


 [ 
https://issues.apache.org/jira/browse/KNOX-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Risden updated KNOX-2249:
---
Resolution: Fixed
Status: Resolved  (was: Patch Available)

Thanks [~vladglinskiy]

> Add Spark 3 History Server definition
> -
>
> Key: KNOX-2249
> URL: https://issues.apache.org/jira/browse/KNOX-2249
> Project: Apache Knox
>  Issue Type: Task
>Reporter: Vladislav Glinskiy
>Assignee: Vladislav Glinskiy
>Priority: Major
> Fix For: 1.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Add Spark 3 History Server(HS) definition. Spark 3 HS could be run alongside 
> Spark 2 HS, so separate service definition is required.



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


[jira] [Commented] (KNOX-2250) maven-antrun-plugin use target instead of tasks

2020-02-25 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044507#comment-17044507
 ] 

ASF subversion and git services commented on KNOX-2250:
---

Commit cbbf233bfd06cdd8443e1eea8a5613ee9df34cf4 in knox's branch 
refs/heads/master from Kevin Risden
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=cbbf233 ]

KNOX-2250 - maven-antrun-plugin use target instead of tasks (#273)

Signed-off-by: Kevin Risden 

> maven-antrun-plugin use target instead of tasks
> ---
>
> Key: KNOX-2250
> URL: https://issues.apache.org/jira/browse/KNOX-2250
> Project: Apache Knox
>  Issue Type: Improvement
>  Components: Build
>Reporter: Kevin Risden
>Assignee: Kevin Risden
>Priority: Trivial
> Fix For: 1.4.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> There is a warning about a deprecated usage of tasks:
> {code:java}
> Parameter tasks is deprecated use target instead
> {code}



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


[jira] [Commented] (KNOX-2249) Add Spark 3 History Server definition

2020-02-25 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/KNOX-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17044508#comment-17044508
 ] 

ASF subversion and git services commented on KNOX-2249:
---

Commit 03fab89e40c7fea425ca6153546813a008ced630 in knox's branch 
refs/heads/master from Vlad Glinsky
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=03fab89 ]

KNOX-2249 - Add Spark 3 History Server definition (#270)



> Add Spark 3 History Server definition
> -
>
> Key: KNOX-2249
> URL: https://issues.apache.org/jira/browse/KNOX-2249
> Project: Apache Knox
>  Issue Type: Task
>Reporter: Vladislav Glinskiy
>Assignee: Vladislav Glinskiy
>Priority: Major
> Fix For: 1.4.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Add Spark 3 History Server(HS) definition. Spark 3 HS could be run alongside 
> Spark 2 HS, so separate service definition is required.



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


  1   2   >