[
https://issues.apache.org/jira/browse/SQOOP-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14220634#comment-14220634
]
Richard commented on SQOOP-1775:
--------------------------------
I am not very clear about this issue. What is the bug?
For the authentication mechanism, the name could not be from
{{HEADER_SQOOP_USERNAME}}.
Simple/Pseudo type: from queryString
{code: title=PseudoAuthenticationHandler.java}
private String getUserName(HttpServletRequest request) {
List<NameValuePair> list = URLEncodedUtils.parse(request.getQueryString(),
UTF8_CHARSET);
if (list != null) {
for (NameValuePair nv : list) {
if (PseudoAuthenticator.USER_NAME.equals(nv.getName())) {
return nv.getValue();
}
}
}
return null;
}
{code}
Kerberos type: from verified principal
{code:title=KerberosAuthenticationHandler.java}
String clientPrincipal = gssContext.getSrcName().toString();
KerberosName kerberosName = new KerberosName(clientPrincipal);
String userName = kerberosName.getShortName();
token = new AuthenticationToken(userName, clientPrincipal,
getType());
response.setStatus(HttpServletResponse.SC_OK);
LOG.trace("SPNEGO completed for principal [{}]",
clientPrincipal);
{code}
In the next sub-task of Kerberos (SQOOP-1776: Delegation Token support for
Authentication), {{user.name}} will be used as the only way to get the
authorized user.
> Sqoop2: Use username during simple auth
> ---------------------------------------
>
> Key: SQOOP-1775
> URL: https://issues.apache.org/jira/browse/SQOOP-1775
> Project: Sqoop
> Issue Type: Bug
> Components: sqoop2-server
> Affects Versions: 1.99.5
> Reporter: Abraham Elmahrek
> Assignee: Abraham Elmahrek
> Fix For: 1.99.5
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)