Python-KrbContext.

Kerberos ÄÁÅؽºÆ® °ü¸®ÀÚ
Áö±Ý ´Ù¿î·Îµå

Python-KrbContext. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • GPL
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Chenxiong Qi
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • https://github.com/tkdchen/

Python-KrbContext. ű×


Python-KrbContext. ¼³¸í

Python-KrbContext´Â Kerberos °ü·Ã ÄÁÅؽºÆ®¿¡¼­ ÀÚ°Ý Áõ¸í ij½Ã (ƼÄÏ ÆÄÀÏ)ÀÇ ÃʱâÈ­¸¦ ¼öÇàÇÏ´Â Python ¸ðµâÀÔ´Ï´Ù. °³¹ßÀÚ°¡ Kerberos ȯ°æÀ» ÇÊ¿ä·ÎÇÏ´Â Äڵ带 Kerberos Context.One¿¡ Á¦°ø ÇÒ ¼öÀÖ°Ô ÇØÁÖ´Â Context Manager¸¦ Á¦°øÇÕ´Ï´Ù. Áß¿äÇÑ °ÍÀº kerberos.krbcontext¸¦ »ç¿ëÇÏ¿© ¾î¶² ÀÛ¾÷À» ¼öÇàÇϱâ Àü¿¡ /etc/krb5.conf¸¦ ¿Ã¹Ù¸£°Ô ±¸¼ºÇؾßÇÕ´Ï´Ù. ¸Å¹ø È£ÃâµË´Ï´Ù. ÀÏ¹Ý Kerberos »ç¿ëÀÚ ¶Ç´Â ¼­ºñ½º Å°ÅÇ ÆÄÀÏÀ» »ç¿ëÇÏ¿© krbcontext¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÏ¹Ý »ç¿ëÀÚ·Î ÀÛ¾÷Çϸé KrbContext´Â Kerberos °èÁ¤ÀÇ ¾ÏÈ£¸¦ ÀÔ·ÂÇ϶ó´Â ¸Þ½ÃÁö¸¦ Ç¥½ÃÇÕ´Ï´Ù. ¾î¶² ¹æ¹ý À¸·Îµç KRBContext´Â ±âº»°ª ¼¼Æ®¿Í ÁöÁ¤µÈ °ªÀ» ¼ö¶ôÇÕ´Ï´Ù. KRBContext, »ç¿ëÀÚ ¹× ¼­ºñ½ºÀÇ ÁÖü, ¼­ºñ½º Å°ÅÇ ÆÄÀÏ ¹× ÀÚ°Ý Áõ¸í ij½Ã (ƼÄÏ ÆÄÀÏ)¸¦ »ç¿ëÇϱâ Àü¿¡ ¾Ë¾Æ¾ß ÇÒ ¸î °¡Áö °³³äÀÌ ÀÖ½À´Ï´Ù. µû¶ó¼­ KrbContext·Î Àü´Þ µÈ Àμö´Â ÀÌ·¯ÇÑ °³³ä¿¡ ¸ÅÇε˴ϴ٠.DependencieskrbContext´Â Python-KRBV¿¡ µû¶ó ´Ù¸¨´Ï´Ù. ÀÌ°ÍÀº Kerberos 5 ¿ë ÆÄÀ̽ã È®Àå ¸ðµâÀÔ´Ï´Ù. FedoraHosted.org¿¡¼­ È£½ºÆõǸéÀÌ URLÀ» ¼öÇàÇÏ¿© ÀÚ¼¼ÇÑ ³»¿ëÀ» ¾òÀ» ¼ö ÀÖ½À´Ï´Ù. https://fedorahosted.org/python-krbv/ rpm ¹èÆ÷ÆÇÀ» »ç¿ëÇÏ¿© KRBContext¸¦ ¼³Ä¡Çϵµ·Ï ¼±ÅÃÇϸé Á¾¼Ó¼ºÀÌ ÀÚµ¿À¸·Î ÇØ°áµË´Ï´Ù. ¹Ý¸é¿¡ easy_install ¶Ç´Â pip¸¦ »ç¿ëÇÏ´Â °æ¿ì yum ¶Ç´Â ¼Ò½º¿¡¼­ ºôµå¸¦ ½ÇÇàÇÏ¿© python-krbv first.usageargumentsusing_keytabÀ» ¼³Ä¡ÇÏ´Â °ÍÀÌ ÇÊ¿äÇÕ´Ï´Ù. ¼­ºñ½º Å°ÅÇÀ» »ç¿ëÇÏ¿© ÀÚ°Ý Áõ¸í ij½Ã¸¦ ÃʱâÈ­ÇÒÁö ¿©ºÎ¸¦ ÁöÁ¤ÇϽʽÿÀ. ±âº»°ªÀº falseÀÔ´Ï´Ù .Kwargs ÀÚ°Ý Áõ¸í ij½Ã¸¦ ÃʱâÈ­ÇÏ´Â µ¥ ÇÊ¿äÇÑ Àμö¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Àü´ÞÇÒ ¼ö ÀÖ½À´Ï´Ù : - ÁÖü : »ç¿ëÀÚ ÁÖ ¶Ç´Â ¼­ºñ½º Principal- KeyTab_File : keytab ÆÄÀÏÀÇ Àý´ë °æ·Î - ccache_file : ÀÚ°Ý Áõ¸í CacheBasickRbContextÀÇ Àý´ë °æ·Î´Â ÀϹÝÀûÀÎ ÄÁÅؽºÆ® °ü¸®ÀÚ·Î »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù. >>> KrbContext () : ... ## ±ÍÇÏÀÇ ÄÚµå´Â ... krbContext ()¿Í ÇÔ²² Á¤±Ô »ç¿ëÀÚ >>> Passthis´Â °¡Àå °£´ÜÇÑ ¹æ¹ýÀÔ´Ï´Ù. ±âº»°ªÀ» »ç¿ëÇÕ´Ï´Ù. ·Î±×ÀÎ À̸§ÀÌ ¾Æ´Ñ ÇöÀç À¯È¿ÇÑ »ç¿ëÀÚ À̸§À» °¡Á® ¿Í¼­ ±âº» ÀÚ°Ý Áõ¸í ij½Ã, / tmp / krb5cc_xxx¸¦ ÃʱâÈ­ÇÕ´Ï´Ù. ¿©±â¼­ ¿©±â¼­ xxx´Â os.getuid ¸Þ¼­µå¿¡¼­ ¹Ýȯ µÈ ÇöÀç »ç¿ëÀÚ IDÀÔ´Ï´Ù. »ç¿ëÀÚ Á¤ÀÇ °ª >>> »ç¿ëÀÚ Á¤ÀÇ °ª (principal = 'qcxhome) @ pypi.python.com ', ... ccache_file ='/ tmp / krb5cc_my ') : ... pass ... >>> KrbContext (principal ='qcxhome ', ... ccache_file ='/ tmp / krb5cc_my) ') : ... krbContext (using_keytab = true, ... principial='http/localhost@pypi.python.com')¿Í ÇÔ²² ¼­ºñ½º Keytab >>> PressYou »ç¿ë PassYou using_keytabÀ» Á¦¿ÜÇÑ ±âº»°ªÀ» ¿©±â¿¡¼­ »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ¹× ±³Àå. ±âº» Å°ÅÇÀº À§¿Í °°ÀÌ /etc/krb5.keytab ¹× ±âº» ÀÚ°Ý Áõ¸í ij½Ã À§Ä¡ / tmp / krb5cc_xxx¸¦ ã½À´Ï´Ù. >>> KrbContext (using_keytab = true, ... principal='http/localhost@pypi.python.com ') : ... keytab_file ='/ etc / httpd / conf / httpd.keytab ', ... ccache_file = '/ tmp / krb5cc_pid_appname') : ... Ưº°ÇÑ ¸ñÀûÀ»À§ÇÑ ´Ù¸¥ °÷°ú ÀÚ°Ý Áõ¸í ij½Ã ÀÎ ´Ù¸¥ Å°ÅÇÀÌÀÖ´Â ´Ù¸¥ Å° ÅÇÀÌ ÀÖÀ¸¸é keytab_file°ú ccache_file.productÀÇ È¨ÆäÀÌÁö¸¦ Àü´ÞÇÒ ¼ö ÀÖ½À´Ï´Ù.


Python-KrbContext. °ü·Ã ¼ÒÇÁÆ®¿þ¾î