¿ìËÙÒµÎñͨµÀ

ÓÃKerberosΪJ2MEÓ¦ÓóÌÐòÉÏËø£¬µÚ3²¿·Ö - ½¨Á¢Óëµç×ÓÒøÐеݲȫͨÐÅ£¨ÉÏ£© - ±à³ÌÈëÃÅÍø

×÷Õß ØýÃû¼¼Êõ À´Ô´ NET±à³Ì ä¯ÀÀ ·¢²¼Ê±¼ä 2012-06-15

ÓÃKerberosΪJ2MEÓ¦ÓóÌÐòÉÏËø£¬µÚ3²¿·Ö - ½¨Á¢Óëµç×ÓÒøÐеݲȫͨÐÅ£¨ÉÏ£©

ʱ¼ä:2011-08-05 IBM Faheem Khan

¼ò½é£ºÈç¹ûÄúÒѾ­Ñ§Ï°Á˱¾ÏµÁеÄÇ°Á½²¿·Ö£¬ÄÇôÏÖÔÚ¿ÉÒÔ¿ªÊ¼µÚÈý²¿·Ö£¬Ò²¾ÍÊÇ×îºóÒ»²¿·Ö£¬Äú½« ÉèÖÃÒ»¸ö KDC ·þÎñÆ÷£¬ÏòËü·¢ËÍ Kerberos Ʊ¾ÝÇëÇó²¢È¡µÃÆäÏìÓ¦¡£È»ºó£¬Äú½«Ñ§Ï°´¦Àí KDC ·þÎñÆ÷µÄ ÏìÓ¦ËùÐèµÄµÍ²ã ASN1 ´¦Àí·½·¨£¬ÒÔ±ãÈ¡µÃƱ¾ÝºÍ»á»°ÃÜÔ¿¡£È¡µÃÁË·þÎñƱ¾Ýºó£¬½«Ïòµç×ÓÒøÐеÄÒµÎñÂß ¼­·þÎñÆ÷·¢ËÍÒ»¸ö½¨Á¢°²È«ÉÏÏÂÎĵÄÇëÇó¡£×îºó£¬Äú½«Ñ§»áÓëµç×ÓÒøÐÐÒµÎñÂß¼­·þÎñÆ÷½øÐÐʵ¼ÊµÄ°²È«Í¨ ÐÅ¡£

»Ø¹Ë±¾ÏµÁÐµÄ µÚһƪÎÄÕ£¬Ëü½éÉÜÁËÒƶ¯ÒøÐÐ MIDlet Ó¦ÓóÌÐò£¬²¢½âÊÍÁË Kerberos ÊÇÈçºÎÂú×ãÕâ ÖÖÓ¦ÓóÌÐòµÄ°²È«ÒªÇóµÄ¡£ÎÄÕ»¹ÃèÊöÁË Kerberos ÓÃÀ´Ìṩ°²È«ÐÔµÄÊý¾Ý¸ñʽ¡£

±¾ÏµÁÐµÄ µÚ¶þƪ ÎÄÕÂչʾÁËÈçºÎÔÚ J2ME ÖÐÉú³É ASN.1 Êý¾ÝÀàÐÍ¡£½éÉÜÁËÈçºÎÓà Bouncy Castle ¼ÓÃÜ¿â½øÐÐ DES ¼ÓÃÜ£¬²¢ÓÃÓû§µÄÃÜÂëÉú³É Kerberos ÃÜÔ¿¡£×îºó½«ÕâЩÄÚÈݷŵ½Ò»Æð²¢Éú³ÉÒ»¸ö Kerberos Ʊ¾ÝÇëÇó¡£

ÔÚ±¾ÏµÁÐÎÄÕÂÖпª·¢µÄ Kerberos ¿Í»§²»ÒªÇóij¸öÌض¨µÄ Kerberos ·þÎñÆ÷£¬Ëü¿ÉÒÔʹÓÃËùÓÐ KDC ʵ ÏÖ¡£

²»¹ÜËùÑ¡µÄÊÇʲô KDC ·þÎñÆ÷£¬±ØÐë¸æËß·þÎñÆ÷Òƶ¯ÒøÐÐ MIDlet µÄÓû§ÔÚ¶Ô TGT µÄÇëÇóÖв»ÐèÒª ·¢ËÍÔ¤ÈÏÖ¤Êý¾Ý£¨ padata £¬±¾ÏµÁеÚһƪÎÄÕµÄͼ 2 ÖÐÏÔʾµÄ KDC-REQ ½á¹¹µÄµÚÈý¸ö×ֶΣ©¡£

¸ù¾Ý Kerberos ¹æ·¶£¬·¢ËÍ padata ×Ö¶ÎÊÇ¿ÉÒÔÑ¡ÔñµÄ¡£Òò´Ë£¬KDC ·þÎñÆ÷ͨ³£ÔÊÐíÅäÖÃÌض¨µÄÓû§ £¬Ê¹µÃ¶ÔÓÚËùÅäÖõÄÓû§²»ÐèÒª padata ×ֶξͿÉÒÔ½ÓÊÜ TGT ÇëÇó¡£ÎªÁ˾¡Á¿¼õÉÙ Kerberos ¿Í»§»úÉÏ µÄ¸ººÉ£¬±ØÐë¸æËß KDC ·þÎñÆ÷½ÓÊܵç×ÓÒøÐÐÒƶ¯Óû§µÄ²»´ø padata µÄ TGT ÇëÇó¡£

ÔÚÕâ¸öÀý×ÓÖУ¬ÎÒʹÓÃÁË Microsoft µÄ KDC ·þÎñÆ÷ÒÔÊÔÑé»ùÓÚ J2ME µÄÒƶ¯ÒøÐÐÓ¦ÓóÌÐò¡£ÔÚ±¾ÎÄ Ô´´úÂëÏÂÔØ ÖÐµÄ readme.txt Îļþ°üº¬ÁËÈçºÎÉèÖà KDC ·þÎñÆ÷¡¢ÒÔ¼°ÈçºÎ¸æËßËü½ÓÊܲ»´ø padata ×ֶΠµÄ TGT ÇëÇóµÄÖ¸µ¼¡££¨ÔÚÎҵēÓõ¥µãµÇ¼¼ò»¯ÆóÒµ Java ÈÏÖ¤”Ò»ÎÄÖУ¬ÎÒʹÓÃÁËͬһ¸ö KDC ·þÎñÆ÷ չʾµ¥µãµÇ¼¡£ÓйØÁ´½ÓÇë²ÎÔÄ ²Î¿¼×ÊÁÏ¡££©

Ïò KDC ·þÎñÆ÷·¢ËÍ TGT ÇëÇó

ÉèÖÃÁË KDC ·þÎñÆ÷ºó£¬¾ÍÏòËü·¢ËÍ TGT ÇëÇ󡣿´Ò»Ï Çåµ¥ 1 ÖÐµÄ getTicketResponse() ·½·¨¡£Ëü Óë ±¾ÏµÁеڶþƪÎÄÕÂÖеÄÇåµ¥ 12 ÖÐµÄ getTicketResponse() ·½·¨ÊÇÏàͬµÄ£¬Ö»ÓÐÒ»´¦²»Í¬£ºÕâ¸ö·½·¨ ÏÖÔÚ°üÀ¨Ïò KDC ·þÎñÆ÷·¢ËÍ TGT ÇëÇóµÄ J2ME ´úÂë¡£ÔÚ Çåµ¥ 1Öбê³öÁËеĴúÂ룬ËùÒÔÄú¿ÉÒÔ¹Û²ìÔÚ Çåµ¥ 12ÖÐûÓеÄÐÂÔö´úÂë¡£

ÔÚ Çåµ¥ 1 µÄ NEW CODE ²¿·ÖÖУ¬ÎÒÒÔÒ»¸öÏÖÓÐµÄ DatagramConnection ¶ÔÏó£¨ dc £©Îª»ù´¡´´½¨ÁË Ò»¸öÐ嵀 Datagram ¶ÔÏó£¨ dg £©¡£×¢ÒâÔÚ±¾ÎĵÄ×îºóÒ»½ÚÖУ¬Òƶ¯ÒøÐÐ MIDlet ´´½¨ÁËÎÒÔÚÕâÀïÓÃÀ´´´ ½¨ Datagram ¶ÔÏóµÄ dc ¶ÔÏó¡£

´´½¨ÁË dg ¶ÔÏóºó£¬getTicketResponse() ·½·¨µ÷ÓÃÁËËüµÄ send() ·½·¨£¬Ïò KDC ·þÎñÆ÷·¢ËÍƱ¾ÝÇë Çó¡£

ÔÚÏò·þÎñÆ÷·¢ËÍÁË TGT ÇëÇóÖ®ºó£¬Çåµ¥ 1 µÄ getTicketResponse() ·½·¨½ÓÊÕ·þÎñÆ÷µÄ TGT ÏìÓ¦¡£ ÊÕµ½ÏìÓ¦ºó£¬Ëü½«ÏìÓ¦·µ»Ø¸øµ÷ÓÃÓ¦ÓóÌÐò¡£

Çåµ¥ 1. getTicketResponse() ·½·¨

public¡¡byte[]¡¡getTicketResponse(¡¡) ¡¡¡¡ { ¡¡¡¡¡¡¡¡ byte¡¡ticketRequest[]; ¡¡¡¡¡¡¡¡ byte¡¡msg_type[]; ¡¡¡¡¡¡¡¡ byte¡¡pvno[]¡¡=¡¡getTagAndLengthBytes(ASN1DataTypes.CONTEXT_SPECIFIC, ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ 1,¡¡getIntegerBytes(5)); ¡¡¡¡¡¡¡¡ msg_type¡¡=¡¡getTagAndLengthBytes(ASN1DataTypes.CONTEXT_SPECIFIC, ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ 2,¡¡getIntegerBytes(10)); ¡¡¡¡¡¡¡¡ byte¡¡kdc_options[]¡¡=¡¡getTagAndLengthBytes(ASN1DataTypes.CONTEXT_SPECIFIC, ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ 0,¡¡getBitStringByt

ÁèÖڿƼ¼×¨ÒµÌṩ·þÎñÆ÷×âÓᢷþÎñÆ÷Íйܡ¢ÆóÒµÓʾ֡¢ÐéÄâÖ÷»úµÈ·þÎñ£¬¹«Ë¾ÍøÕ¾£ºhttp://www.lingzhong.cn ΪÁ˸ø¹ã´ó¿Í»§Á˽â¸ü¶àµÄ¼¼ÊõÐÅÏ¢£¬±¾¼¼ÊõÎÄÕÂÊÕ¼¯À´Ô´ÓÚÍøÂç,ÁèÖڿƼ¼×ðÖØÎÄÕÂ×÷ÕߵİæȨ£¬Èç¹ûÓÐÉæ¼°ÄãµÄ°æȨÓбØҪɾ³ýÄãµÄÎÄÕ£¬ÇëºÍÎÒÃÇÁªÏµ¡£ÒÔÉÏÐÅÏ¢ÓëÎÄÕÂÕýÎÄÊDz»¿É·Ö¸îµÄÒ»²¿·Ö,Èç¹ûÄúҪתÔر¾ÎÄÕÂ,Çë±£ÁôÒÔÉÏÐÅÏ¢£¬Ð»Ð»!

·ÖÏíµ½£º ¸ü¶à

Copyright ©1999-2011 ÏÃÃÅÁèÖڿƼ¼ÓÐÏÞ¹«Ë¾ ÏÃÃÅÓÅͨ»¥Áª¿Æ¼¼¿ª·¢ÓÐÏÞ¹«Ë¾ All rights reserved

µØÖ·(ADD)£ºÏÃÃÅÈí¼þÔ°¶þÆÚÍûº£Â·63ºÅ701E£¨¶«ÄÏÈÚͨÅÔ£© Óʱà(ZIP)£º361008

µç»°£º0592-5908028 ´«Õ棺0592-5908039 ×ÉѯÐÅÏ䣺web@lingzhong.cn ×ÉѯOICQ£º173723134

¡¶ÖлªÈËÃñ¹²ºÍ¹úÔöÖµµçÐÅÒµÎñ¾­ÓªÐí¿ÉÖ¤¡·ÃöB2-20100024  ICP±¸°¸:ÃöICP±¸05037997ºÅ