Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49C2E176FD for ; Fri, 27 Mar 2015 16:55:54 +0000 (UTC) Received: (qmail 39543 invoked by uid 500); 27 Mar 2015 16:55:54 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 39492 invoked by uid 500); 27 Mar 2015 16:55:54 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 39474 invoked by uid 99); 27 Mar 2015 16:55:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2015 16:55:54 +0000 Date: Fri, 27 Mar 2015 16:55:54 +0000 (UTC) From: "Kai Zheng (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DIRKRB-193) Token decryption MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRKRB-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384141#comment-14384141 ] Kai Zheng commented on DIRKRB-193: ---------------------------------- Hi Jiajia, It looks great ! Just a minor in the test, please make the following functions as private. Thanks. {code} + public void setEncryptKey() { + KeyPair encryptionKeyPair = getKeyPair(); + JwtTokenEncoder.setEncryptionKey((RSAPublicKey) encryptionKeyPair.getPublic()); + JwtTokenDecoder.setDecryptionKey((RSAPrivateKey) encryptionKeyPair.getPrivate()); + } + + public KeyPair getKeyPair() { + KeyPairGenerator kpg = null; + try { + kpg = KeyPairGenerator.getInstance("RSA"); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return kpg.generateKeyPair(); + } {code} > Token decryption > ---------------- > > Key: DIRKRB-193 > URL: https://issues.apache.org/jira/browse/DIRKRB-193 > Project: Directory Kerberos > Issue Type: New Feature > Reporter: Kai Zheng > Assignee: Jiajia Li > Attachments: DIRKRB-193-V1.patch, DIRKRB-193-V2.patch > > > In {{TokenPreauth}}, when KDC receives a token, it needs decryption of the token first for subsequent processing. The decryption key is the private key of the KDC server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)