|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
public interface SaslServer
SASL ÀÎÁõÀ» ¼¹ö·Î¼ ½ÇÇàÇÕ´Ï´Ù.
LDAP ¼¹ö¿Í °°Àº ¼¹ö´Â ƯÁ¤ÀÇ SASL µµ±¸¿¡ ÀÇÇØ Á¤ÀÇµÈ ÀÎÁõÀ» ½ÇÇàÇϱâ À§Çؼ ÀÌ Å¬·¡½ºÀÇ ÀνºÅϽº¸¦ ÃëµæÇÕ´Ï´Ù. SaslServer ÀνºÅϽº¿¡ ´ëÇÑ ¸Þ¼µå¸¦ È£ÃâÇϸé, SaslServer¿¡ ÀÇÇØ ±¸ÇöµÈ SASL µµ±¸¿¡ µû¶ó 縰Áö°¡ ÀÛ¼ºµË´Ï´Ù. ÀÎÁõÀÌ Ã³¸®µÉ ¶§, SASL ¼¹öÀÇ ÀÎÁõ ±³È¯ »óŰ¡ ¾Ïȣȵ˴ϴÙ.
´ÙÀ½¿¡ LDAP ¼¹ö°¡ ¾î¶»°Ô SaslServer¸¦ »ç¿ëÇÒ±îÀÇ ¿¹¸¦ ³ªÅ¸³À´Ï´Ù. ¿ì¼±, Ŭ¶óÀÌ¾ðÆ®¿¡ ÀÇÇØ ¿ä±¸µÈ SASL µµ±¸ ÀÇ SaslServer ÀνºÅϽº¸¦ ÃëµæÇÕ´Ï´Ù.
À̰ÍÀ¸·Î ¼¹ö¸¦ ÀÎÁõ¿¡ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î LDAP ¼¹ö°¡ SASL µµ±¸ ÀÇ À̸§°ú (¿É¼ÇÀÇ) Ãʱâ ÀÀ´äÀ» Æ÷ÇÔÇÑ LDAP BIND ¿ä±¸¸¦ ¼ö½ÅÇß´Ù°í Çϸé, ¼¹ö¸¦ ´ÙÀ½°ú °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.SaslServer ss = Sasl.createSaslServer(mechanism, "ldap", myFQDN, props, callbackHandler);
while (! ss.isComplete()) { try { byte[] challenge = ss.evaluateResponse(response);
if (ss.isComplete()) { status = ldap.sendBindResponse(mechanism, challenge, SUCCESS);
} else { status = ldap.sendBindResponse(mechanism, challenge, SASL_BIND_IN_PROGRESS);
response = ldap.readBindRequest();
} } catch (SaslException e) { status = ldap.sendErrorResponse(e);
break;
} } if (ss.isComplete() && status == SUCCESS) { String qop = (String) sc.getNegotiatedProperty(Sasl.QOP);
if (qop ! = null && (qop.equalsIgnoreCase("auth-int") || qop.equalsIgnoreCase("auth-conf"))) {
// Use SaslServer.wrap() and SaslServer.unwrap() for future // communication with client ldap.in = new SecureInputStream(ss, ldap.in); ldap.out = new SecureOutputStream(ss, ldap.out); } }
Sasl,
SaslServerFactory | ¸Þ¼µå °³¿ä | |
|---|---|
void |
dispose ()
SaslServer ÀÌ »ç¿ëÇϰí ÀÖ´Â system resource ¶Ç´Â º¸¾È»ó Áß¿äÇÑ Á¤º¸¸¦ ÆÄ±âÇÕ´Ï´Ù. |
byte[] |
evaluateResponse (byte[] response)
ÀÀ´ä µ¥ÀÌÅ͸¦ Æò°¡ÇØ, 縰Áö¸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
String |
getAuthorizationID ()
ÀÌ ¼¼¼ÇÀÇ Å¬¶óÀÌ¾ðÆ®¿¡ À¯È¿ÇÑ ÀÎÁõ ID¸¦ º¸°íÇÕ´Ï´Ù. |
String |
getMechanismName ()
ÀÌ SASL ¼¹öÀÇ IANA µî·ÏµÈ µµ±¸ ¸í (CRAM-MD5, GSSAPI µî)À» ¸®ÅÏÇÕ´Ï´Ù. |
Object |
getNegotiatedProperty (String propName)
³×°í½Ã¿¡ÀÌÆ® µÈ ÇÁ·ÎÆÛƼ¸¦ ²¨³À´Ï´Ù. |
boolean |
isComplete ()
ÀÎÁõ ±³È¯ÀÌ ¿Ï·áÇß´ÂÁö ¾î¶°Çß´ÂÁö¸¦ ÆÇÁ¤ÇÕ´Ï´Ù. |
byte[] |
unwrap (byte[] incoming,
int offset,
int len)
Ŭ¶óÀÌ¾ðÆ®·ÎºÎÅÍ ¼ö½ÅÇÑ ¹ÙÀÌÆ® ¹è¿À» ·¦ ÇØÁ¦ÇÕ´Ï´Ù. |
byte[] |
wrap (byte[] outgoing,
int offset,
int len)
Ŭ¶óÀÌ¾ðÆ®¿¡ ¼Û½ÅÇÏ´Â ¹ÙÀÌÆ® ¹è¿À» ·¦ ÇÕ´Ï´Ù. |
| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
String getMechanismName()
byte[] evaluateResponse(byte[] response)
throws SaslException
response - Ŭ¶óÀÌ¾ðÆ®·ÎºÎÅÍ ¼Û½ÅµÇ´Â null ÀÌ¿ÜÀÇ ÀÀ´ä. ºñ¾îÀÖ´Â °æ¿ìµµ ÀÖ´Ù
SaslException - ÀÀ´äÀÇ Ã³¸®½Ã ¶Ç´Â 縰ÁöÀÇ ÀÛ¼º½Ã¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ìboolean isComplete()
String getAuthorizationID()
IllegalStateException - ÀÌ ÀÎÁõ ¼¼¼ÇÀÌ ¿Ï·áÇÏÁö ¾Ê¾Ò´ø °æ¿ì
byte[] unwrap(byte[] incoming,
int offset,
int len)
throws SaslException
incoming´Â ±æÀ̸¦ ³ªÅ¸³»´Â ÃÖÃÊÀÇ 4°³ÀÇ 8Áßâ Çʵ带 Á¦¿ÜÇÑ, RFC 2222¿¡ Á¤ÀÇµÈ SASL ¹öÆÛÀÇ ³»¿ëÀÔ´Ï´Ù. offset¿Í len´Â incoming »ç¿ë ºÎºÐÀ» ÁöÁ¤ÇÕ´Ï´Ù.
incoming - Ŭ¶óÀÌ¾ðÆ®·ÎºÎÅÍ ¼ö½ÅÇÑ encode µÈ ¹ÙÀÌÆ®¸¦ Æ÷ÇÔÇÑ null ÀÌ¿ÜÀÇ ¹ÙÀÌÆ® ¹è¿offset - »ç¿ëÇÏ´Â ¹ÙÀÌÆ®ÀÇ incoming¿¡
¼ÀÇ °³½Ã À§Ä¡len - »ç¿ëÇÏ´Â incoming
¹ÙÀÌÆ®¼ö
SaslException - incoming¸¦ Á¤»óÀûÀ¸·Î ·¦ ÇØÁ¦ÇÒ ¼ö ¾ø´Â °æ¿ì
IllegalStateException - ÀÎÁõ ±³È¯ÀÌ ¿Ï·áÇÏÁö ¾Ê¾Ò´ø °æ¿ì, ¶Ç´Â ³×°í½Ã¿¡ÀÌÆ® µÈ º¸È£ ǰÁú¿¡ Á¤ÇÕ¼ºµµ ±â¹Ð¼ºµµ °®ÃçÁöÁö ¾ÊÀº °æ¿ì
byte[] wrap(byte[] outgoing,
int offset,
int len)
throws SaslException
ÀÌ ¸Þ¼µåÀÇ °á°ú´Â ±æÀ̸¦ ³ªÅ¸³»´Â ÃÖÃÊÀÇ 4°³ÀÇ 8Áßâ Çʵ带 Á¦¿ÜÇÑ, RFC 2222¿¡ Á¤ÀÇµÈ SASL ¹öÆÛÀÇ ³»¿ëÀ» ±¸¼ºÇÕ´Ï´Ù. offset¿Í len´Â outgoing »ç¿ë ºÎºÐÀ» ÁöÁ¤ÇÕ´Ï´Ù.
outgoing - encode ÇÏ´Â ¹ÙÀÌÆ®¸¦ Æ÷ÇÔÇÑ null ÀÌ¿ÜÀÇ ¹ÙÀÌÆ® ¹è¿offset - »ç¿ëÇÏ´Â ¹ÙÀÌÆ®ÀÇ outgoing¿¡
¼ÀÇ °³½Ã À§Ä¡len - »ç¿ëÇÏ´Â outgoing
¹ÙÀÌÆ®¼ö
SaslException - outgoing¸¦ Á¤»óÀûÀ¸·Î ·¦ ÇÒ ¼ö ¾ø´Â °æ¿ì
IllegalStateException - ÀÎÁõ ±³È¯ÀÌ ¿Ï·áÇÏÁö ¾Ê¾Ò´ø °æ¿ì, ¶Ç´Â ³×°í½Ã¿¡ÀÌÆ® µÈ º¸È£ ǰÁú¿¡ Á¤ÇÕ¼ºµµ ±â¹Ð¼ºµµ °®ÃçÁöÁö ¾ÊÀº °æ¿ìObject getNegotiatedProperty(String propName)
propName - ÇÁ·ÎÆÛƼ
IllegalStateException - ÀÌ ÀÎÁõ ±³È¯ÀÌ ¿Ï·áÇÏÁö ¾Ê¾Ò´ø °æ¿ì
void dispose()
throws SaslException
SaslException - ÀÚ¿øÀ» ÆÄ±âÇϰí ÀÖÀ» ¶§ ¹®Á¦°¡ ¹ß»ýÇßÀ» °æ¿ì
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.