[
https://issues.apache.org/jira/browse/KNOX-2569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17313055#comment-17313055
]
cdmikechen commented on KNOX-2569:
----------------------------------
I found the problem! It is because that in atlas rewrite.xml path
*ATLAS/atlas/inbound/query*, KNOX use pattern :
{code}
<rule dir="IN" name="ATLAS/atlas/inbound/query"
pattern="*://*:*/**/atlas/{**}?{**}">
<rewrite template="{$serviceUrl[ATLAS]}/{**}?{**}"/>
</rule>
{code}
If Atlas call rest api with url like */atlas/api/atlas/v2/search/saved* , KNOX
will rewrite to */v2/search/saved*. It is not right. It should be
*/api/atlas/v2/search/saved*. So I change this pattern :
{code}
<rule dir="IN" name="ATLAS/atlas/inbound/query"
pattern="*://*:*/*/*/atlas/{**}?{**}" flow="OR">
<match pattern="*://*:*/*/*/atlas/**/img/{**}?{**}">
<rewrite template="{$serviceUrl[ATLAS]}/img/{**}?{**}"/>
</match>
<match pattern="*://*:*/*/*/atlas/{**}?{**}">
<rewrite template="{$serviceUrl[ATLAS]}/{**}?{**}"/>
</match>
</rule>
{code}
It works and I login Atlas by KONX successfully~
> KNOX 1.5.0 can not login Atlas
> ------------------------------
>
> Key: KNOX-2569
> URL: https://issues.apache.org/jira/browse/KNOX-2569
> Project: Apache Knox
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.5.0
> Reporter: cdmikechen
> Priority: Blocker
> Attachments: image-2021-04-01-13-37-29-830.png,
> image-2021-04-01-13-42-00-226.png
>
>
> I use KNOX to login Atlas (2.1.0), I found Atlas can not login by KNOX
> cookie. So I checked Atlas cookie and found that KNOX set Atlas like this:
> !image-2021-04-01-13-37-29-830.png!
> In *ATLASSESSIONID*, KNOX removed the comma separation! I also login Atlas
> without KNOX and I can login successfully. The Atlas cookie is here:
> !image-2021-04-01-13-42-00-226.png!
> I think KNOX replace Altas cookie but spell wrong.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)