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