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