001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.forgerock.opendj.server.config.meta; 027 028 029 030import org.forgerock.opendj.config.AdministratorAction; 031import org.forgerock.opendj.config.AggregationPropertyDefinition; 032import org.forgerock.opendj.config.AliasDefaultBehaviorProvider; 033import org.forgerock.opendj.config.BooleanPropertyDefinition; 034import org.forgerock.opendj.config.ClassPropertyDefinition; 035import org.forgerock.opendj.config.client.ConcurrentModificationException; 036import org.forgerock.opendj.config.client.ManagedObject; 037import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException; 038import org.forgerock.opendj.config.client.OperationRejectedException; 039import org.forgerock.opendj.config.conditions.Conditions; 040import org.forgerock.opendj.config.DefaultBehaviorProvider; 041import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider; 042import org.forgerock.opendj.config.EnumPropertyDefinition; 043import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException; 044import org.forgerock.opendj.config.ManagedObjectDefinition; 045import org.forgerock.opendj.config.PropertyOption; 046import org.forgerock.opendj.config.PropertyProvider; 047import org.forgerock.opendj.config.server.ConfigurationChangeListener; 048import org.forgerock.opendj.config.server.ServerManagedObject; 049import org.forgerock.opendj.config.StringPropertyDefinition; 050import org.forgerock.opendj.config.Tag; 051import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider; 052import org.forgerock.opendj.ldap.DN; 053import org.forgerock.opendj.ldap.LdapException; 054import org.forgerock.opendj.server.config.client.GSSAPISASLMechanismHandlerCfgClient; 055import org.forgerock.opendj.server.config.client.IdentityMapperCfgClient; 056import org.forgerock.opendj.server.config.server.GSSAPISASLMechanismHandlerCfg; 057import org.forgerock.opendj.server.config.server.IdentityMapperCfg; 058import org.forgerock.opendj.server.config.server.SASLMechanismHandlerCfg; 059 060 061 062/** 063 * An interface for querying the GSSAPI SASL Mechanism Handler managed 064 * object definition meta information. 065 * <p> 066 * The GSSAPI SASL mechanism performs all processing related to SASL 067 * GSSAPI authentication using Kerberos V5. 068 */ 069public final class GSSAPISASLMechanismHandlerCfgDefn extends ManagedObjectDefinition<GSSAPISASLMechanismHandlerCfgClient, GSSAPISASLMechanismHandlerCfg> { 070 071 /** The singleton configuration definition instance. */ 072 private static final GSSAPISASLMechanismHandlerCfgDefn INSTANCE = new GSSAPISASLMechanismHandlerCfgDefn(); 073 074 075 076 /** 077 * Defines the set of permissable values for the "quality-of-protection" property. 078 * <p> 079 * The name of a property that specifies the quality of protection 080 * the server will support. 081 */ 082 public static enum QualityOfProtection { 083 084 /** 085 * Quality of protection equals authentication with integrity and 086 * confidentiality protection. 087 */ 088 CONFIDENTIALITY("confidentiality"), 089 090 091 092 /** 093 * Quality of protection equals authentication with integrity 094 * protection. 095 */ 096 INTEGRITY("integrity"), 097 098 099 100 /** 101 * QOP equals authentication only. 102 */ 103 NONE("none"); 104 105 106 107 /** String representation of the value. */ 108 private final String name; 109 110 111 112 /** Private constructor. */ 113 private QualityOfProtection(String name) { this.name = name; } 114 115 116 117 /** {@inheritDoc} */ 118 public String toString() { return name; } 119 120 } 121 122 123 124 /** The "identity-mapper" property definition. */ 125 private static final AggregationPropertyDefinition<IdentityMapperCfgClient, IdentityMapperCfg> PD_IDENTITY_MAPPER; 126 127 128 129 /** The "java-class" property definition. */ 130 private static final ClassPropertyDefinition PD_JAVA_CLASS; 131 132 133 134 /** The "kdc-address" property definition. */ 135 private static final StringPropertyDefinition PD_KDC_ADDRESS; 136 137 138 139 /** The "keytab" property definition. */ 140 private static final StringPropertyDefinition PD_KEYTAB; 141 142 143 144 /** The "principal-name" property definition. */ 145 private static final StringPropertyDefinition PD_PRINCIPAL_NAME; 146 147 148 149 /** The "quality-of-protection" property definition. */ 150 private static final EnumPropertyDefinition<QualityOfProtection> PD_QUALITY_OF_PROTECTION; 151 152 153 154 /** The "realm" property definition. */ 155 private static final StringPropertyDefinition PD_REALM; 156 157 158 159 /** The "server-fqdn" property definition. */ 160 private static final StringPropertyDefinition PD_SERVER_FQDN; 161 162 163 164 /** Build the "identity-mapper" property definition. */ 165 static { 166 AggregationPropertyDefinition.Builder<IdentityMapperCfgClient, IdentityMapperCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "identity-mapper"); 167 builder.setOption(PropertyOption.MANDATORY); 168 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "identity-mapper")); 169 builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>()); 170 builder.setParentPath("/"); 171 builder.setRelationDefinition("identity-mapper"); 172 builder.setTargetNeedsEnablingCondition(Conditions.contains("enabled", "true")); 173 builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true")); 174 PD_IDENTITY_MAPPER = builder.getInstance(); 175 INSTANCE.registerPropertyDefinition(PD_IDENTITY_MAPPER); 176 INSTANCE.registerConstraint(PD_IDENTITY_MAPPER.getSourceConstraint()); 177 } 178 179 180 181 /** Build the "java-class" property definition. */ 182 static { 183 ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class"); 184 builder.setOption(PropertyOption.MANDATORY); 185 builder.setOption(PropertyOption.ADVANCED); 186 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class")); 187 DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.extensions.GSSAPISASLMechanismHandler"); 188 builder.setDefaultBehaviorProvider(provider); 189 builder.addInstanceOf("org.opends.server.api.SASLMechanismHandler"); 190 PD_JAVA_CLASS = builder.getInstance(); 191 INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS); 192 } 193 194 195 196 /** Build the "kdc-address" property definition. */ 197 static { 198 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "kdc-address"); 199 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "kdc-address")); 200 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "kdc-address")); 201 PD_KDC_ADDRESS = builder.getInstance(); 202 INSTANCE.registerPropertyDefinition(PD_KDC_ADDRESS); 203 } 204 205 206 207 /** Build the "keytab" property definition. */ 208 static { 209 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "keytab"); 210 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "keytab")); 211 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "keytab")); 212 PD_KEYTAB = builder.getInstance(); 213 INSTANCE.registerPropertyDefinition(PD_KEYTAB); 214 } 215 216 217 218 /** Build the "principal-name" property definition. */ 219 static { 220 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "principal-name"); 221 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "principal-name")); 222 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "principal-name")); 223 PD_PRINCIPAL_NAME = builder.getInstance(); 224 INSTANCE.registerPropertyDefinition(PD_PRINCIPAL_NAME); 225 } 226 227 228 229 /** Build the "quality-of-protection" property definition. */ 230 static { 231 EnumPropertyDefinition.Builder<QualityOfProtection> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "quality-of-protection"); 232 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "quality-of-protection")); 233 DefaultBehaviorProvider<QualityOfProtection> provider = new DefinedDefaultBehaviorProvider<QualityOfProtection>("none"); 234 builder.setDefaultBehaviorProvider(provider); 235 builder.setEnumClass(QualityOfProtection.class); 236 PD_QUALITY_OF_PROTECTION = builder.getInstance(); 237 INSTANCE.registerPropertyDefinition(PD_QUALITY_OF_PROTECTION); 238 } 239 240 241 242 /** Build the "realm" property definition. */ 243 static { 244 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "realm"); 245 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "realm")); 246 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "realm")); 247 PD_REALM = builder.getInstance(); 248 INSTANCE.registerPropertyDefinition(PD_REALM); 249 } 250 251 252 253 /** Build the "server-fqdn" property definition. */ 254 static { 255 StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "server-fqdn"); 256 builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "server-fqdn")); 257 builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "server-fqdn")); 258 PD_SERVER_FQDN = builder.getInstance(); 259 INSTANCE.registerPropertyDefinition(PD_SERVER_FQDN); 260 } 261 262 263 264 // Register the tags associated with this managed object definition. 265 static { 266 INSTANCE.registerTag(Tag.valueOf("security")); 267 } 268 269 270 271 /** 272 * Get the GSSAPI SASL Mechanism Handler configuration definition 273 * singleton. 274 * 275 * @return Returns the GSSAPI SASL Mechanism Handler configuration 276 * definition singleton. 277 */ 278 public static GSSAPISASLMechanismHandlerCfgDefn getInstance() { 279 return INSTANCE; 280 } 281 282 283 284 /** 285 * Private constructor. 286 */ 287 private GSSAPISASLMechanismHandlerCfgDefn() { 288 super("gssapi-sasl-mechanism-handler", SASLMechanismHandlerCfgDefn.getInstance()); 289 } 290 291 292 293 /** {@inheritDoc} */ 294 public GSSAPISASLMechanismHandlerCfgClient createClientConfiguration( 295 ManagedObject<? extends GSSAPISASLMechanismHandlerCfgClient> impl) { 296 return new GSSAPISASLMechanismHandlerCfgClientImpl(impl); 297 } 298 299 300 301 /** {@inheritDoc} */ 302 public GSSAPISASLMechanismHandlerCfg createServerConfiguration( 303 ServerManagedObject<? extends GSSAPISASLMechanismHandlerCfg> impl) { 304 return new GSSAPISASLMechanismHandlerCfgServerImpl(impl); 305 } 306 307 308 309 /** {@inheritDoc} */ 310 public Class<GSSAPISASLMechanismHandlerCfg> getServerConfigurationClass() { 311 return GSSAPISASLMechanismHandlerCfg.class; 312 } 313 314 315 316 /** 317 * Get the "enabled" property definition. 318 * <p> 319 * Indicates whether the SASL mechanism handler is enabled for use. 320 * 321 * @return Returns the "enabled" property definition. 322 */ 323 public BooleanPropertyDefinition getEnabledPropertyDefinition() { 324 return SASLMechanismHandlerCfgDefn.getInstance().getEnabledPropertyDefinition(); 325 } 326 327 328 329 /** 330 * Get the "identity-mapper" property definition. 331 * <p> 332 * Specifies the name of the identity mapper that is to be used with 333 * this SASL mechanism handler to match the Kerberos principal 334 * included in the SASL bind request to the corresponding user in the 335 * directory. 336 * 337 * @return Returns the "identity-mapper" property definition. 338 */ 339 public AggregationPropertyDefinition<IdentityMapperCfgClient, IdentityMapperCfg> getIdentityMapperPropertyDefinition() { 340 return PD_IDENTITY_MAPPER; 341 } 342 343 344 345 /** 346 * Get the "java-class" property definition. 347 * <p> 348 * Specifies the fully-qualified name of the Java class that 349 * provides the SASL mechanism handler implementation. 350 * 351 * @return Returns the "java-class" property definition. 352 */ 353 public ClassPropertyDefinition getJavaClassPropertyDefinition() { 354 return PD_JAVA_CLASS; 355 } 356 357 358 359 /** 360 * Get the "kdc-address" property definition. 361 * <p> 362 * Specifies the address of the KDC that is to be used for Kerberos 363 * processing. 364 * <p> 365 * If provided, this property must be a fully-qualified 366 * DNS-resolvable name. If this property is not provided, then the 367 * server attempts to determine it from the system-wide Kerberos 368 * configuration. 369 * 370 * @return Returns the "kdc-address" property definition. 371 */ 372 public StringPropertyDefinition getKdcAddressPropertyDefinition() { 373 return PD_KDC_ADDRESS; 374 } 375 376 377 378 /** 379 * Get the "keytab" property definition. 380 * <p> 381 * Specifies the path to the keytab file that should be used for 382 * Kerberos processing. 383 * <p> 384 * If provided, this is either an absolute path or one that is 385 * relative to the server instance root. 386 * 387 * @return Returns the "keytab" property definition. 388 */ 389 public StringPropertyDefinition getKeytabPropertyDefinition() { 390 return PD_KEYTAB; 391 } 392 393 394 395 /** 396 * Get the "principal-name" property definition. 397 * <p> 398 * Specifies the principal name. 399 * <p> 400 * It can either be a simple user name or a service name such as 401 * host/example.com. If this property is not provided, then the 402 * server attempts to build the principal name by appending the fully 403 * qualified domain name to the string "ldap/". 404 * 405 * @return Returns the "principal-name" property definition. 406 */ 407 public StringPropertyDefinition getPrincipalNamePropertyDefinition() { 408 return PD_PRINCIPAL_NAME; 409 } 410 411 412 413 /** 414 * Get the "quality-of-protection" property definition. 415 * <p> 416 * The name of a property that specifies the quality of protection 417 * the server will support. 418 * 419 * @return Returns the "quality-of-protection" property definition. 420 */ 421 public EnumPropertyDefinition<QualityOfProtection> getQualityOfProtectionPropertyDefinition() { 422 return PD_QUALITY_OF_PROTECTION; 423 } 424 425 426 427 /** 428 * Get the "realm" property definition. 429 * <p> 430 * Specifies the realm to be used for GSSAPI authentication. 431 * 432 * @return Returns the "realm" property definition. 433 */ 434 public StringPropertyDefinition getRealmPropertyDefinition() { 435 return PD_REALM; 436 } 437 438 439 440 /** 441 * Get the "server-fqdn" property definition. 442 * <p> 443 * Specifies the DNS-resolvable fully-qualified domain name for the 444 * system. 445 * 446 * @return Returns the "server-fqdn" property definition. 447 */ 448 public StringPropertyDefinition getServerFqdnPropertyDefinition() { 449 return PD_SERVER_FQDN; 450 } 451 452 453 454 /** 455 * Managed object client implementation. 456 */ 457 private static class GSSAPISASLMechanismHandlerCfgClientImpl implements 458 GSSAPISASLMechanismHandlerCfgClient { 459 460 /** Private implementation. */ 461 private ManagedObject<? extends GSSAPISASLMechanismHandlerCfgClient> impl; 462 463 464 465 /** Private constructor. */ 466 private GSSAPISASLMechanismHandlerCfgClientImpl( 467 ManagedObject<? extends GSSAPISASLMechanismHandlerCfgClient> impl) { 468 this.impl = impl; 469 } 470 471 472 473 /** {@inheritDoc} */ 474 public Boolean isEnabled() { 475 return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 476 } 477 478 479 480 /** {@inheritDoc} */ 481 public void setEnabled(boolean value) { 482 impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value); 483 } 484 485 486 487 /** {@inheritDoc} */ 488 public String getIdentityMapper() { 489 return impl.getPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition()); 490 } 491 492 493 494 /** {@inheritDoc} */ 495 public void setIdentityMapper(String value) { 496 impl.setPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition(), value); 497 } 498 499 500 501 /** {@inheritDoc} */ 502 public String getJavaClass() { 503 return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 504 } 505 506 507 508 /** {@inheritDoc} */ 509 public void setJavaClass(String value) { 510 impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value); 511 } 512 513 514 515 /** {@inheritDoc} */ 516 public String getKdcAddress() { 517 return impl.getPropertyValue(INSTANCE.getKdcAddressPropertyDefinition()); 518 } 519 520 521 522 /** {@inheritDoc} */ 523 public void setKdcAddress(String value) { 524 impl.setPropertyValue(INSTANCE.getKdcAddressPropertyDefinition(), value); 525 } 526 527 528 529 /** {@inheritDoc} */ 530 public String getKeytab() { 531 return impl.getPropertyValue(INSTANCE.getKeytabPropertyDefinition()); 532 } 533 534 535 536 /** {@inheritDoc} */ 537 public void setKeytab(String value) { 538 impl.setPropertyValue(INSTANCE.getKeytabPropertyDefinition(), value); 539 } 540 541 542 543 /** {@inheritDoc} */ 544 public String getPrincipalName() { 545 return impl.getPropertyValue(INSTANCE.getPrincipalNamePropertyDefinition()); 546 } 547 548 549 550 /** {@inheritDoc} */ 551 public void setPrincipalName(String value) { 552 impl.setPropertyValue(INSTANCE.getPrincipalNamePropertyDefinition(), value); 553 } 554 555 556 557 /** {@inheritDoc} */ 558 public QualityOfProtection getQualityOfProtection() { 559 return impl.getPropertyValue(INSTANCE.getQualityOfProtectionPropertyDefinition()); 560 } 561 562 563 564 /** {@inheritDoc} */ 565 public void setQualityOfProtection(QualityOfProtection value) { 566 impl.setPropertyValue(INSTANCE.getQualityOfProtectionPropertyDefinition(), value); 567 } 568 569 570 571 /** {@inheritDoc} */ 572 public String getRealm() { 573 return impl.getPropertyValue(INSTANCE.getRealmPropertyDefinition()); 574 } 575 576 577 578 /** {@inheritDoc} */ 579 public void setRealm(String value) { 580 impl.setPropertyValue(INSTANCE.getRealmPropertyDefinition(), value); 581 } 582 583 584 585 /** {@inheritDoc} */ 586 public String getServerFqdn() { 587 return impl.getPropertyValue(INSTANCE.getServerFqdnPropertyDefinition()); 588 } 589 590 591 592 /** {@inheritDoc} */ 593 public void setServerFqdn(String value) { 594 impl.setPropertyValue(INSTANCE.getServerFqdnPropertyDefinition(), value); 595 } 596 597 598 599 /** {@inheritDoc} */ 600 public ManagedObjectDefinition<? extends GSSAPISASLMechanismHandlerCfgClient, ? extends GSSAPISASLMechanismHandlerCfg> definition() { 601 return INSTANCE; 602 } 603 604 605 606 /** {@inheritDoc} */ 607 public PropertyProvider properties() { 608 return impl; 609 } 610 611 612 613 /** {@inheritDoc} */ 614 public void commit() throws ManagedObjectAlreadyExistsException, 615 MissingMandatoryPropertiesException, ConcurrentModificationException, 616 OperationRejectedException, LdapException { 617 impl.commit(); 618 } 619 620 621 622 /** {@inheritDoc} */ 623 public String toString() { 624 return impl.toString(); 625 } 626 } 627 628 629 630 /** 631 * Managed object server implementation. 632 */ 633 private static class GSSAPISASLMechanismHandlerCfgServerImpl implements 634 GSSAPISASLMechanismHandlerCfg { 635 636 /** Private implementation. */ 637 private ServerManagedObject<? extends GSSAPISASLMechanismHandlerCfg> impl; 638 639 /** The value of the "enabled" property. */ 640 private final boolean pEnabled; 641 642 /** The value of the "identity-mapper" property. */ 643 private final String pIdentityMapper; 644 645 /** The value of the "java-class" property. */ 646 private final String pJavaClass; 647 648 /** The value of the "kdc-address" property. */ 649 private final String pKdcAddress; 650 651 /** The value of the "keytab" property. */ 652 private final String pKeytab; 653 654 /** The value of the "principal-name" property. */ 655 private final String pPrincipalName; 656 657 /** The value of the "quality-of-protection" property. */ 658 private final QualityOfProtection pQualityOfProtection; 659 660 /** The value of the "realm" property. */ 661 private final String pRealm; 662 663 /** The value of the "server-fqdn" property. */ 664 private final String pServerFqdn; 665 666 667 668 /** Private constructor. */ 669 private GSSAPISASLMechanismHandlerCfgServerImpl(ServerManagedObject<? extends GSSAPISASLMechanismHandlerCfg> impl) { 670 this.impl = impl; 671 this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition()); 672 this.pIdentityMapper = impl.getPropertyValue(INSTANCE.getIdentityMapperPropertyDefinition()); 673 this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition()); 674 this.pKdcAddress = impl.getPropertyValue(INSTANCE.getKdcAddressPropertyDefinition()); 675 this.pKeytab = impl.getPropertyValue(INSTANCE.getKeytabPropertyDefinition()); 676 this.pPrincipalName = impl.getPropertyValue(INSTANCE.getPrincipalNamePropertyDefinition()); 677 this.pQualityOfProtection = impl.getPropertyValue(INSTANCE.getQualityOfProtectionPropertyDefinition()); 678 this.pRealm = impl.getPropertyValue(INSTANCE.getRealmPropertyDefinition()); 679 this.pServerFqdn = impl.getPropertyValue(INSTANCE.getServerFqdnPropertyDefinition()); 680 } 681 682 683 684 /** {@inheritDoc} */ 685 public void addGSSAPIChangeListener( 686 ConfigurationChangeListener<GSSAPISASLMechanismHandlerCfg> listener) { 687 impl.registerChangeListener(listener); 688 } 689 690 691 692 /** {@inheritDoc} */ 693 public void removeGSSAPIChangeListener( 694 ConfigurationChangeListener<GSSAPISASLMechanismHandlerCfg> listener) { 695 impl.deregisterChangeListener(listener); 696 } 697 /** {@inheritDoc} */ 698 public void addChangeListener( 699 ConfigurationChangeListener<SASLMechanismHandlerCfg> listener) { 700 impl.registerChangeListener(listener); 701 } 702 703 704 705 /** {@inheritDoc} */ 706 public void removeChangeListener( 707 ConfigurationChangeListener<SASLMechanismHandlerCfg> listener) { 708 impl.deregisterChangeListener(listener); 709 } 710 711 712 713 /** {@inheritDoc} */ 714 public boolean isEnabled() { 715 return pEnabled; 716 } 717 718 719 720 /** {@inheritDoc} */ 721 public String getIdentityMapper() { 722 return pIdentityMapper; 723 } 724 725 726 727 /** 728 * {@inheritDoc} 729 */ 730 public DN getIdentityMapperDN() { 731 String value = getIdentityMapper(); 732 if (value == null) return null; 733 return INSTANCE.getIdentityMapperPropertyDefinition().getChildDN(value); 734 } 735 736 737 738 /** {@inheritDoc} */ 739 public String getJavaClass() { 740 return pJavaClass; 741 } 742 743 744 745 /** {@inheritDoc} */ 746 public String getKdcAddress() { 747 return pKdcAddress; 748 } 749 750 751 752 /** {@inheritDoc} */ 753 public String getKeytab() { 754 return pKeytab; 755 } 756 757 758 759 /** {@inheritDoc} */ 760 public String getPrincipalName() { 761 return pPrincipalName; 762 } 763 764 765 766 /** {@inheritDoc} */ 767 public QualityOfProtection getQualityOfProtection() { 768 return pQualityOfProtection; 769 } 770 771 772 773 /** {@inheritDoc} */ 774 public String getRealm() { 775 return pRealm; 776 } 777 778 779 780 /** {@inheritDoc} */ 781 public String getServerFqdn() { 782 return pServerFqdn; 783 } 784 785 786 787 /** {@inheritDoc} */ 788 public Class<? extends GSSAPISASLMechanismHandlerCfg> configurationClass() { 789 return GSSAPISASLMechanismHandlerCfg.class; 790 } 791 792 793 794 /** {@inheritDoc} */ 795 public DN dn() { 796 return impl.getDN(); 797 } 798 799 800 801 /** {@inheritDoc} */ 802 public String toString() { 803 return impl.toString(); 804 } 805 } 806}