PageRenderTime 45ms CodeModel.GetById 3ms app.highlight 34ms RepoModel.GetById 1ms app.codeStats 0ms

/domain-management/src/main/java/org/jboss/as/domain/management/DomainManagementMessages.java

https://github.com/dbuos/wildfly
Java | 1170 lines | 281 code | 143 blank | 746 comment | 0 complexity | 6a6787b727c3eb0af1c8aa5eee403012 MD5 | raw file
   1/*
   2 * JBoss, Home of Professional Open Source.
   3 * Copyright 2011, Red Hat, Inc., and individual contributors
   4 * as indicated by the @author tags. See the copyright.txt file in the
   5 * distribution for a full listing of individual contributors.
   6 *
   7 * This is free software; you can redistribute it and/or modify it
   8 * under the terms of the GNU Lesser General Public License as
   9 * published by the Free Software Foundation; either version 2.1 of
  10 * the License, or (at your option) any later version.
  11 *
  12 * This software is distributed in the hope that it will be useful,
  13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15 * Lesser General Public License for more details.
  16 *
  17 * You should have received a copy of the GNU Lesser General Public
  18 * License along with this software; if not, write to the Free
  19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21 */
  22
  23package org.jboss.as.domain.management;
  24
  25import java.io.IOException;
  26import java.security.GeneralSecurityException;
  27import java.util.Set;
  28
  29import javax.naming.NamingException;
  30import javax.security.auth.callback.Callback;
  31import javax.security.auth.callback.UnsupportedCallbackException;
  32import javax.xml.stream.Location;
  33import javax.xml.stream.XMLStreamException;
  34
  35import org.jboss.as.controller.OperationFailedException;
  36import org.jboss.as.controller.PathAddress;
  37import org.jboss.as.controller.PathElement;
  38import org.jboss.as.domain.management.security.password.PasswordValidationException;
  39import org.jboss.logging.Messages;
  40import org.jboss.logging.annotations.Cause;
  41import org.jboss.logging.annotations.Message;
  42import org.jboss.logging.annotations.MessageBundle;
  43import org.jboss.logging.annotations.Param;
  44import org.jboss.msc.service.StartException;
  45
  46/**
  47 * Date: 05.11.2011
  48 *
  49 * @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
  50 * @author <a href="mailto:darran.lofthouse@jboss.com">Darran Lofthouse</a>
  51 */
  52@MessageBundle(projectCode = "JBAS")
  53public interface DomainManagementMessages {
  54
  55    /**
  56     * The messages
  57     */
  58    DomainManagementMessages MESSAGES = Messages.getBundle(DomainManagementMessages.class);
  59
  60    /**
  61     * Creates an exception indicating the verification could not be performed.
  62     *
  63     * @param cause the cause of the error.
  64     *
  65     * @return an {@link IOException} for the error.
  66     */
  67    @Message(id = 15220, value = "Unable to perform verification")
  68    IOException cannotPerformVerification(@Cause Throwable cause);
  69
  70    /**
  71     * Creates an exception indicating the realm was invalid.
  72     *
  73     * @param realm         the invalid realm.
  74     * @param expectedRealm the expected realm.
  75     *
  76     * @return an {@link IllegalStateException} for the error.
  77     */
  78    @Message(id = 15221, value = "Invalid Realm '%s' expected '%s'")
  79    IllegalStateException invalidRealm(String realm, String expectedRealm);
  80
  81    /**
  82     * Creates an exception indicating the referral for authentication could not be followed.
  83     *
  84     * @param name the invalid name.
  85     *
  86     * @return a {@link NamingException} for the error.
  87     */
  88    @Message(id = 15222, value = "Can't follow referral for authentication: %s")
  89    NamingException nameNotFound(String name);
  90
  91    /**
  92     * Creates an exception indicating no authentication mechanism was defined in the security realm.
  93     *
  94     * @return an {@link IllegalStateException} for the error.
  95     */
  96    //@Message(id = 15223, value = "No authentication mechanism defined in security realm.")
  97    //IllegalStateException noAuthenticationDefined();
  98
  99    /**
 100     * Creates an exception indicating no username was provided.
 101     *
 102     * @return an {@link IOException} for the error.
 103     */
 104    @Message(id = 15224, value = "No username provided.")
 105    IOException noUsername();
 106
 107    /**
 108     * Creates an exception indicating no password was provided.
 109     *
 110     * @return an {@link IOException} for the error.
 111     */
 112    @Message(id = 15225, value = "No password to verify.")
 113    IOException noPassword();
 114
 115    /**
 116     * Creates an exception indicating that one of {@code attr1} or {@code attr2} is required.
 117     *
 118     * @param attr1 the first attribute.
 119     * @param attr2 the second attribute.
 120     *
 121     * @return an {@link IllegalArgumentException} for the error.
 122     */
 123    @Message(id = 15226, value = "One of '%s' or '%s' required.")
 124    IllegalArgumentException oneOfRequired(String attr1, String attr2);
 125
 126    /**
 127     * Creates an exception indicating the realm is not supported.
 128     *
 129     * @param callback the callback used to create the exception.
 130     *
 131     * @return an {@link UnsupportedCallbackException} for the error.
 132     */
 133    @Message(id = 15227, value = "Realm choice not currently supported.")
 134    UnsupportedCallbackException realmNotSupported(@Param Callback callback);
 135
 136    /**
 137     * Creates an exception indicating the properties could not be loaded.
 138     *
 139     * @param cause the cause of the error.
 140     *
 141     * @return a {@link StartException} for the error.
 142     */
 143    @Message(id = 15228, value = "Unable to load properties")
 144    StartException unableToLoadProperties(@Cause Throwable cause);
 145
 146    /**
 147     * Creates an exception indicating the inability to start the service.
 148     *
 149     * @param cause the cause of the error.
 150     *
 151     * @return a {@link StartException} for the error.
 152     */
 153    @Message(id = 15229, value = "Unable to start service")
 154    StartException unableToStart(@Cause Throwable cause);
 155
 156    /**
 157     * A message indicating the user, represented by the {@code username} parameter, was not found.
 158     *
 159     * @param username the username not found.
 160     *
 161     * @return the message.
 162     */
 163    @Message(id = 15230, value = "User '%s' not found.")
 164    String userNotFound(String username);
 165
 166    /**
 167     * Creates an exception indicating the user, represented by the {@code username} parameter, was not found in the
 168     * directory.
 169     *
 170     * @param username the username not found.
 171     *
 172     * @return an {@link IOException} for the error.
 173     */
 174    @Message(id = 15231, value = "User '%s' not found in directory.")
 175    IOException userNotFoundInDirectory(String username);
 176
 177    /**
 178     * Creates an exception indicating that no java.io.Console is available.
 179     *
 180     * @return a {@link IllegalStateException} for the error.
 181     */
 182    @Message(id = 15232, value = "No java.io.Console available to interact with user.")
 183    IllegalStateException noConsoleAvailable();
 184
 185    /**
 186     * A message indicating JBOSS_HOME not set.
 187     *
 188     * @return a {@link String} for the message.
 189     */
 190    //@Message(id = 15233, value = "JBOSS_HOME environment variable not set.")
 191    //String jbossHomeNotSet();
 192
 193    /**
 194     * A message indicating no mgmt-users.properties have been found.
 195     *
 196     * @return a {@link String} for the message.
 197     */
 198    @Message(id = 15234, value = "No %s files found.")
 199    String propertiesFileNotFound(String file);
 200
 201    /**
 202     * A message prompting the user to enter the details of the user being added.
 203     *
 204     * @return a {@link String} for the message.
 205     */
 206    @Message(id = Message.NONE, value = "Enter the details of the new user to add.")
 207    String enterNewUserDetails();
 208
 209    /**
 210     * The prompt to obtain the realm from the user.
 211     *
 212     * @param realm - the default realm.
 213     *
 214     * @return a {@link String} for the message.
 215     */
 216    @Message(id = Message.NONE, value = "Realm (%s)")
 217    String realmPrompt(String realm);
 218
 219    /**
 220     * The prompt to obtain the new username from the user.
 221     *
 222     * @return a {@link String} for the message.
 223     */
 224    @Message(id = Message.NONE, value = "Username")
 225    String usernamePrompt();
 226
 227    /**
 228     * The prompt to obtain the new username from the user.
 229     *
 230     * @param defaultUsername - The default username if no value is entered.
 231     *
 232     * @return a {@link String} for the message.
 233     */
 234    @Message(id = Message.NONE, value = "Username (%s)")
 235    String usernamePrompt(String defaultUsername);
 236
 237    /**
 238     * The error message if no username is entered.
 239     *
 240     * @return a {@link String} for the message.
 241     */
 242    @Message(id = 15235, value = "No Username entered, exiting.")
 243    String noUsernameExiting();
 244
 245    /**
 246     * The prompt to obtain the password from the user.
 247     *
 248     * @return a {@link String} for the message.
 249     */
 250    @Message(id = Message.NONE, value = "Password")
 251    String passwordPrompt();
 252
 253    /**
 254     * The error message if no password is entered.
 255     *
 256     * @return a {@link String} for the message.
 257     */
 258    @Message(id = 15236, value = "No Password entered, exiting.")
 259    String noPasswordExiting();
 260
 261    /**
 262     * The prompt to obtain the password confirmation from the user.
 263     *
 264     * @return a {@link String} for the message.
 265     */
 266    @Message(id = Message.NONE, value = "Re-enter Password")
 267    String passwordConfirmationPrompt();
 268
 269    /**
 270     * The error message if the passwords do not match.
 271     *
 272     * @return a {@link String} for the message.
 273     */
 274    @Message(id = 15237, value = "The passwords do not match.")
 275    String passwordMisMatch();
 276
 277    /**
 278     * The error message if the username and password are equal.
 279     *
 280     * @return a {@link String} for the message.
 281     */
 282    @Message(id = 15238, value = "Username must not match the password.")
 283    String usernamePasswordMatch();
 284
 285    /**
 286     * The error message if the username is not alpha numeric
 287     *
 288     * @return a {@link String} for the message.
 289     */
 290    @Message(id = 15239, value = "Only alpha/numeric usernames accepted.")
 291    String usernameNotAlphaNumeric();
 292
 293    /**
 294     * Confirmation of the user being added.
 295     *
 296     * @param username - The new username.
 297     * @param realm - The realm the user is being added for.
 298     *
 299     * @return a {@link String} for the message.
 300     */
 301    @Message(id = Message.NONE, value = "About to add user '%s' for realm '%s'")
 302    String aboutToAddUser(String username, String realm);
 303
 304    /**
 305     * Prompt to ask user to confirm the previous statement is correct.
 306     *
 307     * Do not include the translation specific yes/no
 308     *
 309     * @return a {@link String} for the message.
 310     */
 311    @Message(id = Message.NONE, value = "Is this correct")
 312    String isCorrectPrompt();
 313
 314    /**
 315     * Warning that the username is easy to guess.
 316     *
 317     * @param username - The new username.
 318     *
 319     * @return a {@link String} for the message.
 320     */
 321    @Message(id = Message.NONE, value = "The username '%s' is easy to guess")
 322    String usernameEasyToGuess(String username);
 323
 324    /**
 325     * A prompt to double check the user is really sure they want to add this user.
 326     *
 327     * @param username - The new username.
 328     *
 329     * @return a {@link String} for the message.
 330     */
 331    @Message(id = Message.NONE, value = "Are you sure you want to add user '%s' yes/no?")
 332    String sureToAddUser(String username);
 333
 334    /**
 335     * The error message if the confirmation response is invalid.
 336     *
 337     * @return a {@link String} for the message.
 338     */
 339    @Message(id = 15240, value = "Invalid response. (Valid responses are %s and %s)")
 340    String invalidConfirmationResponse(String firstValues, String secondValues);
 341
 342    /**
 343     * Message to inform user that the new user has been added to the file identified.
 344     *
 345     * @param username - The new username.
 346     * @param fileName - The file the user has been added to.
 347     *
 348     * @return a {@link String} for the message.
 349     */
 350    @Message(id = Message.NONE, value = "Added user '%s' to file '%s'")
 351    String addedUser(String username, String fileName);
 352
 353    /**
 354     * The error message if adding the user to the file fails.
 355     *
 356     * @param file - The name of the file the add failed for.
 357     * @param error - The failure message.
 358     *
 359     * @return a {@link String} for the message.
 360     */
 361    @Message(id = 15241, value = "Unable to add user to %s due to error %s")
 362    String unableToAddUser(String file, String error);
 363
 364    /**
 365     * The error message if loading the known users from file fails.
 366     *
 367     * @param file - The name of the file the load failed for.
 368     * @param error - The failure message.
 369     *
 370     * @return a {@link String} for the message.
 371     */
 372    @Message(id = 15242, value = "Unable to add load users from %s due to error %s")
 373    String unableToLoadUsers(String file, String error);
 374
 375    /**
 376     * The error message header.
 377     *
 378     * @return a {@link String} for the message.
 379     */
 380    @Message(id = Message.NONE, value = "Error")
 381    String errorHeader();
 382
 383    /**
 384     * A message to check if this user is going to be used by a host controller to connect to the master domain controller.
 385     *
 386     * @return a {@link String} for the message.
 387     */
 388    @Message(id = Message.NONE, value = "Is this new user going to be used for one AS process to connect to another AS process? %ne.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.")
 389    String serverUser();
 390
 391    /**
 392     * Simple yes/no prompt.
 393     *
 394     * @return a {@link String} for the message.
 395     */
 396    @Message(id = Message.NONE, value = "yes/no?")
 397    String yesNo();
 398
 399    /**
 400     * To represent this user use the following secret entry in the server-identities.
 401     *
 402     * @return a {@link String} for the message.
 403     */
 404    @Message(id = Message.NONE, value = "To represent the user add the following to the server-identities definition <secret value=\"%s\" />")
 405    String secretElement(String base64);
 406
 407    /**
 408     * Error message if more than one username/password authentication mechanism is defined.
 409     *
 410     * @param realmName the name of the security realm
 411     * @param mechanisms the set of mechanisms .
 412     *
 413     * @return an {@link OperationFailedException} for the error.
 414     */
 415    @Message(id = 15244, value = "Configuration for security realm '%s' includes multiple username/password based authentication mechanisms (%s). Only one is allowed")
 416    OperationFailedException multipleAuthenticationMechanismsDefined(String realmName, Set<String> mechanisms);
 417
 418    /**
 419     * Creates an exception indicating that one of {@code attr1} or {@code attr2} is required.
 420     *
 421     * @param attr1 the first attribute.
 422     * @param attr2 the second attribute.
 423     *
 424     * @return an {@link OperationFailedException} for the error.
 425     */
 426    @Message(id = 15246, value = "One of '%s' or '%s' required.")
 427    OperationFailedException operationFailedOneOfRequired(String attr1, String attr2);
 428
 429    /**
 430     * Creates an exception indicating that only one of {@code attr1} or {@code attr2} is required.
 431     *
 432     * @param attr1 the first attribute.
 433     * @param attr2 the second attribute.
 434     *
 435     * @return an {@link OperationFailedException} for the error.
 436     */
 437    @Message(id = 15247, value = "Only one of '%s' or '%s' is required.")
 438    OperationFailedException operationFailedOnlyOneOfRequired(String attr1, String attr2);
 439
 440    /**
 441     * Creates an IllegalArgumentException indicating that a value can not be null.
 442     *
 443     * @param name - The name of the parameter that can not be null.
 444     * @return an {@link IllegalArgumentException} for the error.
 445     */
 446    @Message(id = 15248, value = "'%s' can not be null.")
 447    IllegalArgumentException canNotBeNull(String name);
 448
 449    /**
 450     * Creates a String for use in an OperationFailedException to indicate that no security context has been established for a
 451     * call that requires one.
 452     */
 453    @Message(id = 15249, value = "No security context has been established.")
 454    String noSecurityContextEstablished();
 455
 456    /**
 457     * Creates a String for use in an OperationFailedException to indicate that an unexpected number of RealmUser instances have
 458     * been found.
 459     *
 460     * @param count - The number of RealmUser instances found.
 461     */
 462    //@Message(id = 15250, value = "An unexpected number (%d) of RealmUsers are associated with the SecurityContext.")
 463    //String unexpectedNumberOfRealmUsers(int count);
 464
 465    /**
 466     * Prompt for the file to update in add-users
 467     */
 468    @Message(id = Message.NONE, value = "What type of user do you wish to add? %n a) Management User (mgmt-users.properties) %n b) Application User (application-users.properties)")
 469    String filePrompt();
 470
 471    /**
 472     * Prompt the user for the groups to add the user to
 473     * @return
 474     */
 475    @Message(id = Message.NONE, value = "What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)")
 476    String groupsPrompt();
 477
 478
 479    /**
 480     * Message to inform user that the new user has been added to the groups file identified.
 481     *
 482     * @param username - The new username.
 483     * @param groups - The new groups.
 484     * @param fileName - The file the user has been added to.
 485     *
 486     * @return a {@link String} for the message.
 487     */
 488    @Message(id = Message.NONE, value = "Added user '%s' with groups %s to file '%s'")
 489    String addedGroups(String username, String groups, String fileName);
 490
 491    /**
 492     * The error message if the choice response is invalid.
 493     *
 494     * TODO - On translation we will need support for checking the possible responses.
 495     *
 496     * @return a {@link String} for the message.
 497     */
 498    @Message(id = 15251, value = "Invalid response. (Valid responses are A, a, B, or b)")
 499    String invalidChoiceResponse();
 500
 501    /**
 502     * Confirmation if the current user (enabled) is about to be updated.
 503     *
 504     * @param user - The name of the user.
 505     *
 506     * @return a {@link String} for the message.
 507     */
 508    @Message(id = Message.NONE, value = "User '%s' already exits and is enabled, would you like to... %n a) Update the existing user password and roles %n b) Disable the existing user %n c) Type a new username")
 509    String aboutToUpdateEnabledUser(String user);
 510
 511    /**
 512     * Confirmation if the current user (disabled) is about to be updated.
 513     *
 514     * @param user - The name of the user.
 515     *
 516     * @return a {@link String} for the message.
 517     */
 518    @Message(id = Message.NONE, value = "User '%s' already exits and is disabled, would you like to... %n a) Update the existing user password and roles %n b) Enable the existing user %n c) Type a new username")
 519    String aboutToUpdateDisabledUser(String user);
 520
 521    /**
 522     * Message to inform user that the user has been updated to the file identified.
 523     *
 524     * @param userName - The new username.
 525     * @param canonicalPath - The file the user has been added to.
 526     *
 527     * @return a {@link String} for the message.
 528     */
 529    @Message(id = Message.NONE, value = "Updated user '%s' to file '%s'")
 530    String updateUser(String userName, String canonicalPath);
 531
 532    /**
 533     * The error message if updating user to the file fails.
 534     *
 535     * @param absolutePath - The name of the file the add failed for.
 536     * @param message - The failure message.
 537     *
 538     * @return a {@link String} for the message.
 539     */
 540    @Message(id = 15254, value = "Unable to update user to %s due to error %s")
 541    String unableToUpdateUser(String absolutePath, String message);
 542
 543    /**
 544     * Message to inform user that the user has been updated to the groups file identified.
 545     *
 546     * @param username - The new username.
 547     * @param groups - The new groups.
 548     * @param fileName - The file the user has been added to.
 549     *
 550     * @return a {@link String} for the message.
 551     */
 552    @Message(id = Message.NONE, value = "Updated user '%s' with groups %s to file '%s'")
 553    String updatedGroups(String username, String groups, String fileName);
 554
 555    /**
 556     * IOException to indicate the user attempting to use local authentication has been rejected.
 557     *
 558     * @param userName - The user attempting local authentication.
 559     * @return an {@link IOException} for the failure.
 560     */
 561    @Message(id = 15255, value = "The user '%s' is not allowed in a local authentication.")
 562    IOException invalidLocalUser(final String userName);
 563
 564    /**
 565     * StartException to indicate that multiple CallbackHandlerServices are associated for the same mechanism.
 566     *
 567     * @param mechanismName - the name of the mechanism being registered.
 568     * @return an {@link StartException} for the failure.
 569     */
 570    @Message(id = 15256, value = "Multiple CallbackHandlerServices for the same mechanism (%s)")
 571    StartException multipleCallbackHandlerForMechanism(final String mechanismName);
 572
 573    /**
 574     * IllegalStateException to indicate a CallbackHandler has been requested for an unsupported mechanism.
 575     *
 576     * @param mechanism - The name of the mechanism requested.
 577     * @param realmName - The name of the realm the mechanism was requested from.
 578     * @return an {@link IllegalStateException} for the failure.
 579     */
 580    @Message(id = 15259, value = "No CallbackHandler available for mechanism %s in realm %s")
 581    IllegalStateException noCallbackHandlerForMechanism(final String mechanism, final String realmName);
 582
 583    /**
 584     * IllegalStateException to indicate no plug in providers were loaded for the specified name.
 585     *
 586     * @param name The name of the module loaded.
 587     * @return an {@link IllegalStateException} for the failure.
 588     */
 589    @Message(id = 15260, value = "No plug in providers found for module name %s")
 590    IllegalArgumentException noPlugInProvidersLoaded(final String name);
 591
 592    /**
 593     * IllegalStateException to indicate a failure loading the PlugIn.
 594     *
 595     * @param name - The name of the plug-in being loaded.
 596     * @param error - The error that occurred.
 597     * @return an {@link IllegalArgumentException} for the failure.
 598     */
 599    @Message(id = 15261, value = "Unable to load plug-in for module %s due to error (%s)")
 600    IllegalArgumentException unableToLoadPlugInProviders(final String name, final String error);
 601
 602    /**
 603     * IllegalArgumentException to indicate that an AuthenticationPlugIn was not loaded.
 604     *
 605     * @param name - The name specified.
 606     * @return an {@link IllegalArgumentException} for the failure.
 607     */
 608    @Message(id = 15262, value = "No authentication plug-in found for name %s")
 609    IllegalArgumentException noAuthenticationPlugInFound(final String name);
 610
 611    /**
 612     * IllegalStateException to indicate that a plug-in could not be initialised.
 613     *
 614     * @param name - The name specified.
 615     * @return an {@link IllegalArgumentException} for the failure.
 616     */
 617    @Message(id = 15263, value = "Unable to initialise plug-in %s due to error %s")
 618    IllegalStateException unableToInitialisePlugIn(final String name, final String message);
 619
 620    /**
 621     * The error message for password which does not met strength requirement.
 622     *
 623     * @param currentStrength - strength value which has been computed from password.
 624     * @param desiredStrength - Minimum strength value which should be met.
 625     *
 626     * @return a {@link String} for the message.
 627     */
 628    @Message(id = 15264, value = "Password is not strong enough, it is '%s'. It should be at least '%s'.")
 629    String passwordNotStrongEnough(String currentStrength, String desiredStrength);
 630
 631    /**
 632     * The error message for password which has forbidden value.
 633     *
 634     * @param password - password value.
 635     *
 636     * @return a {@link PasswordValidationException} for the message.
 637     */
 638    @Message(id = 152565, value = "Password must not be equal to '%s', this value is restricted.")
 639    PasswordValidationException passwordMustNotBeEqual(String password);
 640
 641    /**
 642     * The error message for password which has not enough digit.
 643     * @param minDigit - minimum digit values.
 644     * @return a {@link String} for the message.
 645     */
 646    @Message(id = 15266, value = "Password must have at least %d digit.")
 647    String passwordMustHaveDigit(int minDigit);
 648
 649    /**
 650     * The error message for password which has not enough symbol.
 651     * @param minSymbol - minimum symbol values.
 652     * @return a {@link String} for the message.
 653     */
 654    @Message(id = 15267, value = "Password must have at least %s non-alphanumeric symbol.")
 655    String passwordMustHaveSymbol(int minSymbol);
 656
 657    /**
 658     * The error message for password which has not enough alpha numerical values.
 659     * @param minAlpha - minimum alpha numerical values.
 660     * @return a {@link String} for the message.
 661     */
 662    @Message(id = 15268, value = "Password must have at least %d alphanumeric character.")
 663    String passwordMustHaveAlpha(int minAlpha);
 664
 665    /**
 666     * The error message for password which is not long enough.
 667     * @param desiredLength - desired length of password.
 668     * @return a {@link PasswordValidationException} for the message.
 669     */
 670    @Message(id = 15269, value = "Password must have at least %s characters!")
 671    PasswordValidationException passwordNotLongEnough(int desiredLength);
 672
 673    @Message(id = 15270, value = "Unable to load key trust file.")
 674    IllegalStateException unableToLoadKeyTrustFile(@Cause Throwable t);
 675
 676    @Message(id = 15271, value = "Unable to operate on trust store.")
 677    IllegalStateException unableToOperateOnTrustStore(@Cause GeneralSecurityException gse);
 678
 679    @Message(id = 15272, value = "Unable to create delegate trust manager.")
 680    IllegalStateException unableToCreateDelegateTrustManager();
 681
 682    @Message(id = 15273, value = "The syslog-handler can only contain one protocol %s")
 683    XMLStreamException onlyOneSyslogHandlerProtocol(Location location);
 684
 685    @Message(id = 15274, value = "There is no handler called '%s'")
 686    IllegalStateException noHandlerCalled(String name);
 687
 688    @Message(id = 15275, value = "There is already a protocol configured for the syslog handler at %s")
 689    OperationFailedException sysLogProtocolAlreadyConfigured(PathAddress append);
 690
 691    @Message(id = 15276, value = "No syslog protocol was given")
 692    OperationFailedException noSyslogProtocol();
 693
 694    @Message(id = 15277, value = "There is no formatter called '%s'")
 695    OperationFailedException noFormatterCalled(String formatterName);
 696
 697    @Message(id = 15278, value = "Can not remove formatter, it is still referenced by the hander '%s'")
 698    OperationFailedException cannotRemoveReferencedFormatter(PathElement pathElement);
 699
 700    @Message(id = 15279, value = "Handler names must be unique. There is already a handler called '%s' at %s")
 701    OperationFailedException handlerAlreadyExists(String name, PathAddress append);
 702
 703    /**
 704     * Parsing the user property file different realm names have been detected, the add-user utility requires the same realm
 705     * name to be used across all propery files a user is being added to.
 706     */
 707    @Message(id = 15280, value = "Different realm names detected '%s', '%s' reading user property files, all realms must be equal.")
 708    String multipleRealmsDetected(final String realmOne, final String realmTwo);
 709
 710    /**
 711     * The user has supplied a realm name but the supplied name does not match the name discovered from the property files.
 712     */
 713    @Message(id = 15281, value = "The user supplied realm name '%s' does not match the realm name discovered from the property file(s) '%s'.")
 714    String userRealmNotMatchDiscovered(final String supplied, final String discovered);
 715
 716    /**
 717     * The user has supplied a group properties file name but no user propertites file name.
 718     */
 719    @Message(id = 15282, value = "A group properties file '%s' has been specified, however no user properties has been specified.")
 720    String groupPropertiesButNoUserProperties(final String groupProperties);
 721
 722    /**
 723     * There is no default realm name and the user has not specified one either.
 724     */
 725    @Message(id = 15283, value = "A realm name must be specified.")
 726    String realmMustBeSpecified();
 727
 728    /**
 729     * Creates an exception indicating that RBAC has been enabled but it is not possible for users to be mapped to roles.
 730     *
 731     * @return an {@link OperationFailedException} for the error.
 732     */
 733    @Message(id = 15284, value = "The current operation(s) would result in role based access control being enabled but leave it impossible for authenticated users to be assigned roles.")
 734    OperationFailedException inconsistentRbacConfiguration();
 735
 736    /**
 737     * Creates an exception indicating that the runtime role mapping state is inconsistent.
 738     *
 739     * @return an {@link OperationFailedException} for the error.
 740     */
 741    @Message(id = 15285, value = "The runtime role mapping configuration is inconsistent, the server must be restarted.")
 742    OperationFailedException inconsistentRbacRuntimeState();
 743
 744    /**
 745     * The error message if the choice response is invalid to the update user state.
 746     *
 747     * @return a {@link String} for the message.
 748     */
 749    @Message(id = 15286, value = "Invalid response. (Valid responses are A, a, B, b, C or c)")
 750    String invalidChoiceUpdateUserResponse();
 751
 752    @Message(id = 15287, value = "Role '%s' already contains an %s for type=%s, name=%s, realm=%s.")
 753    OperationFailedException duplicateIncludeExclude(String roleName, String incExcl, String type, String name, String realm);
 754
 755    /**
 756     * Error message if more than one authorization configuration is defined.
 757     *
 758     * @param realmName the name of the security realm
 759     * @param configurations the set of configurations .
 760     *
 761     * @return an {@link OperationFailedException} for the error.
 762     */
 763    @Message(id = 15288, value = "Configuration for security realm '%s' includes multiple authorization configurations (%s). Only one is allowed")
 764    OperationFailedException multipleAuthorizationConfigurationsDefined(String realmName, Set<String> configurations);
 765
 766    /**
 767     * Error message if more than one username-to-dn resource is defined.
 768     *
 769     * @param realmName the name of the security realm
 770     * @param configurations the set of configurations .
 771     *
 772     * @return an {@link OperationFailedException} for the error.
 773     */
 774    @Message(id = 15289, value = "Configuration for security realm '%s' includes multiple username-to-dn resources within the authorization=ldap resource (%s). Only one is allowed")
 775    OperationFailedException multipleUsernameToDnConfigurationsDefined(String realmName, Set<String> configurations);
 776
 777    /**
 778     * Error message if no group-search resource is defined.
 779     *
 780     * @param realmName the name of the security realm
 781     *
 782     * @return an {@link OperationFailedException} for the error.
 783     */
 784    @Message(id = 15290, value = "Configuration for security realm '%s' does not contain any group-search resource within the authorization=ldap resource.")
 785    OperationFailedException noGroupSearchDefined(String realmName);
 786
 787    /**
 788     * Error message if more than one group-search resource is defined.
 789     *
 790     * @param realmName the name of the security realm
 791     * @param configurations the set of configurations .
 792     *
 793     * @return an {@link OperationFailedException} for the error.
 794     */
 795    @Message(id = 15291, value = "Configuration for security realm '%s' includes multiple group-search resources within the authorization=ldap resource (%s). Only one is allowed")
 796    OperationFailedException multipleGroupSearchConfigurationsDefined(String realmName, Set<String> configurations);
 797
 798    /**
 799     * Error message if the name of a role mapping being added is invalid.
 800     *
 801     * @param roleName - The name of the role.
 802     *
 803     * @return an {@link OperationFailedException} for the error.
 804     */
 805    @Message(id = 15292, value = "The role name '%s' is not a valid standard role.")
 806    OperationFailedException invalidRoleName(String roleName);
 807
 808    /**
 809     * Error message if the name of a role mapping being added is invalid.
 810     *
 811     * @param roleName - The name of the role.
 812     *
 813     * @return an {@link OperationFailedException} for the error.
 814     */
 815    @Message(id = 15293, value = "The role name '%s' is not a valid standard role and is not a host scoped role or a server group scoped role.")
 816    OperationFailedException invalidRoleNameDomain(String roleName);
 817
 818    /**
 819     * Error message if the name of a scoped role can not be removed as the role mapping remains.
 820     *
 821     * @param roleName - The name of the role.
 822     *
 823     * @return an {@link OperationFailedException} for the error.
 824     */
 825    @Message(id = 15294, value = "The scoped role '%s' can not be removed as a role mapping still exists.")
 826    OperationFailedException roleMappingRemaining(String roleName);
 827
 828    /**
 829     * Error message if a scoped role already exists with the same name.
 830     *
 831     * @param scopeType - The type of scoped role.
 832     * @param roleName - The name of the role.
 833     *
 834     * @return an {@link OperationFailedException} for the error.
 835     */
 836    @Message(id = 15295, value = "A %s already exists with name '%s'")
 837    OperationFailedException duplicateScopedRole(String scopeType, String roleName);
 838
 839    /**
 840     * Error message if a scoped role name matches a standard role.
 841     *
 842     * @param scopedRole - The name of the scoped role.
 843     * @param standardRole - The name of the standard role.
 844     *
 845     * @return an {@link OperationFailedException} for the error.
 846     */
 847    @Message(id = 15296, value = "The name '%s' conflicts with the standard role name of '%s' - comparison is case insensitive.")
 848    OperationFailedException scopedRoleStandardName(String scopedRole, String standardRole);
 849
 850    /**
 851     * Error message if the base-role is not one of the standard roles.
 852     *
 853     * @param baseRole - The base-role supplied.
 854     *
 855     * @return an {@link OperationFailedException} for the error.
 856     */
 857    @Message(id = 15297, value = "The base-role '%s' is not one of the standard roles for the current authorization provider.")
 858    OperationFailedException badBaseRole(String baseRole);
 859
 860    /**
 861     * Error message if the password and username match.
 862     *
 863     * @return an {@link PasswordValidationException} for the error.
 864     */
 865    @Message(id = 15298, value = "The password must be different from the username")
 866    PasswordValidationException passwordUsernameMatchError();
 867
 868    /**
 869     * Create an exception indicating that there are no keys in the keystore.
 870     *
 871     * @return a {@link StartException} for the error.
 872     */
 873    @Message(id = 15299, value = "The KeyStore %s does not contain any keys.")
 874    StartException noKey(String path);
 875
 876    /**
 877     * Create an exception indicating that the alias specified is not a key.
 878     *
 879     * @return a {@link StartException} for the error.
 880     */
 881    @Message(id = 21000, value = "The alias specified '%s' is not a Key, valid aliases are %s")
 882    StartException aliasNotKey(String alias, String validList);
 883
 884    /**
 885     * Create an exception indicating that the alias specified was not found.
 886     *
 887     * @return a {@link StartException} for the error.
 888     */
 889    @Message(id = 21001, value = "The alias specified '%s' does not exist in the KeyStore, valid aliases are %s")
 890    StartException aliasNotFound(String alias, String validList);
 891
 892    /**
 893     * Create an exception indicating that the keystore was not found.
 894     *
 895     * @return a {@link StartException} for the error.
 896     */
 897    @Message(id = 21002, value = "The KeyStore can not be found at %s")
 898    StartException keyStoreNotFound(String path);
 899
 900    /*
 901     * Logging IDs 15200-15299 and 21000-21099 are reserved for domain management
 902     *
 903     * The file DomainManagementLogger also contains messages in this range 15200-15220.
 904     */
 905
 906    /**
 907     * Information message saying the username and password must be different.
 908     *
 909     * @return an {@link String} for the error.
 910     */
 911    @Message(id = Message.NONE, value = "The password must be different from the username")
 912    String passwordUsernameMatchInfo();
 913
 914    /**
 915     * Information message saying the password must not equal any of the restricted values.
 916     *
 917     * @param restricted - A list of restricted values.
 918     * @return a {@link String} for the message.
 919     */
 920    @Message(id = Message.NONE, value = "The password must not be one of the following restricted values {%s}")
 921    String passwordMustNotEqualInfo(String restricted);
 922
 923    /**
 924     * Information message to describe how many characters need to be in the password.
 925     *
 926     * @param desiredLength - desired length of password.
 927     * @return a {@link String} for the message.
 928     */
 929    @Message(id = Message.NONE, value = "%s characters")
 930    String passwordLengthInfo(int desiredLength);
 931
 932    /**
 933     * Information message for the number of alphanumerical characters required in a password.
 934     *
 935     * @param minAlpha - minimum alpha numerical values.
 936     * @return a {@link String} for the message.
 937     */
 938    @Message(id = Message.NONE, value = "%d alphanumeric character(s)")
 939    String passwordMustHaveAlphaInfo(int minAlpha);
 940
 941    /**
 942     * Information message for the number of digits required in a password.
 943     *
 944     * @param minDigit - minimum digit values.
 945     * @return a {@link String} for the message.
 946     */
 947    @Message(id = Message.NONE, value = "%d digit(s)")
 948    String passwordMustHaveDigitInfo(int minDigit);
 949
 950    /**
 951     * Information message for the number of non alphanumerical symbols required in a password.
 952     *
 953     * @param minSymbol - minimum symbol values.
 954     * @return a {@link String} for the message.
 955     */
 956    @Message(id = Message.NONE, value = "%s non-alphanumeric symbol(s)")
 957    String passwordMustHaveSymbolInfo(int minSymbol);
 958
 959    /**
 960     * Information message to describe what a password must contain.
 961     *
 962     * @param requirements - The requirements list to contain in the message.
 963     *
 964     * @return a {@link String} for the message.
 965     */
 966    @Message(id = Message.NONE, value = "The password must contain at least %s")
 967    String passwordMustContainInfo(String requirements);
 968
 969    /**
 970     * A prompt to double check the user is really sure they want to set password.
 971     *
 972     * @return a {@link String} for the message.
 973     */
 974    @Message(id = Message.NONE, value = "Are you sure you want to use the password entered yes/no?")
 975    String sureToSetPassword();
 976
 977    /**
 978     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#USAGE} command line argument.
 979     * @return the message.
 980     */
 981    @Message(id = Message.NONE, value = "Usage: ./add-user.sh [args...]%nwhere args include:")
 982    String argUsage();
 983
 984    /**
 985     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#APPLICATION_USERS} command line argument.
 986     * @return the message.
 987     */
 988    @Message(id = Message.NONE, value = "If set add an application user instead of a management user")
 989    String argApplicationUsers();
 990
 991    /**
 992     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#DOMAIN_CONFIG_DIR_USERS} command line argument.
 993     * @return the message.
 994     */
 995    @Message(id = Message.NONE, value = "Define the location of the domain config directory.")
 996    String argDomainConfigDirUsers();
 997
 998    /**
 999     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#SERVER_CONFIG_DIR_USERS} command line argument.
1000     * @return the message.
1001     */
1002    @Message(id = Message.NONE, value = "Define the location the server config directory.")
1003    String argServerConfigDirUsers();
1004
1005    /**
1006     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#USER_PROPERTIES} command line argument.
1007     * @return the message.
1008     */
1009    @Message(id = Message.NONE, value = "The file name of the user properties file which can be an absolute path.")
1010    String argUserProperties();
1011
1012    /**
1013     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#GROUP_PROPERTIES} command line argument.
1014     * @return the message.
1015     */
1016    @Message(id = Message.NONE, value = "The file name of the group properties file which can be an absolute path. (If group properties is specified then user properties MUST also be specified).")
1017    String argGroupProperties();
1018
1019    /**
1020     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#PASSWORD} command line argument.
1021     * @return the message.
1022     */
1023    @Message(id = Message.NONE, value = "Password of the user. Should not be same as the username")
1024    String argPassword();
1025
1026    /**
1027     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#USER} command line argument.
1028     * @return the message.
1029     */
1030    @Message(id = Message.NONE, value = "Name of the user")
1031    String argUser();
1032
1033    /**
1034     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#REALM} command line argument.
1035     * @return the message.
1036     */
1037    @Message(id = Message.NONE, value = "Name of the realm used to secure the management interfaces (default is \"ManagementRealm\")")
1038    String argRealm();
1039
1040    /**
1041     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#SILENT} command line argument.
1042     * @return the message.
1043     */
1044    @Message(id = Message.NONE, value = "Activate the silent mode (no output to the console)")
1045    String argSilent();
1046
1047    /**
1048     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#ROLE} command line argument.
1049     * @return the message.
1050     */
1051    @Message(id = Message.NONE, value = "Comma-separated list of roles for the user.")
1052    String argRole();
1053
1054    /**
1055     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#GROUPS} command line argument.
1056     * @return the message.
1057     */
1058    @Message(id = Message.NONE, value = "Comma-separated list of groups for the user.")
1059    String argGroup();
1060
1061    /**
1062     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#ENABLE} command line argument.
1063     * @return the message.
1064     */
1065    @Message(id = Message.NONE, value = "Enable the user")
1066    String argEnable();
1067
1068    /**
1069     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#DISABLE} command line argument.
1070     * @return the message.
1071     */
1072    @Message(id = Message.NONE, value = "Disable the user")
1073    String argDisable();
1074
1075    /**
1076     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#CONFIRM_WARNING} command line argument.
1077     * @return the message.
1078     */
1079    @Message(id = Message.NONE, value = "Automatically confirm warning in interactive mode")
1080    String argConfirmWarning();
1081
1082    /**
1083     * Instructions for the {@link org.jboss.as.domain.management.security.adduser.AddUser.CommandLineArgument#HELP} command line argument.
1084     * @return the message.
1085     */
1086    @Message(id = Message.NONE, value = "Display this message and exit")
1087    String argHelp();
1088
1089    /**
1090     * The long value a user would enter to indicate 'yes'
1091     *
1092     * This String should be the lower case representation in the respective locale.
1093     *
1094     * @return The value a user would enter to indicate 'yes'.
1095     */
1096    @Message(id = Message.NONE, value = "yes")
1097    String yes();
1098
1099    /**
1100     * The short value a user would enter to indicate 'yes'
1101     *
1102     * If no short value is available for a specific translation then only the long value will be accepted.
1103     *
1104     * This String should be the lower case representation in the respective locale.
1105     *
1106     * @return The short value a user would enter to indicate 'yes'.
1107     */
1108    @Message(id = Message.NONE, value = "y")
1109    String shortYes();
1110
1111    /**
1112     * The long value a user would enter to indicate 'no'
1113     *
1114     * This String should be the lower case representation in the respective locale.
1115     *
1116     * @return The value a user would enter to indicate 'no'.
1117     */
1118    @Message(id = Message.NONE, value = "no")
1119    String no();
1120
1121    /**
1122     * The short value a user would enter to indicate 'no'
1123     *
1124     * If no short value is available for a specific translation then only the long value will be accepted.
1125     *
1126     * This String should be the lower case representation in the respective locale.
1127     *
1128     * @return The short value a user would enter to indicate 'no'.
1129     */
1130    @Message(id = Message.NONE, value = "n")
1131    String shortNo();
1132
1133    /**
1134     * Message to check if an alternative realm is really desired.
1135     *
1136     * @return the message.
1137     */
1138    @Message(id = Message.NONE, value = "The realm name supplied must match the name used by the server configuration which by default would be '%s'")
1139    String alternativeRealm(final String defaultRealm);
1140
1141    /**
1142     * Confirmation of realm choice.
1143     *
1144     * @return the message.
1145     */
1146    @Message(id = Message.NONE, value = "Are you sure you want to set the realm to '%s'")
1147    String realmConfirmation(final String chosenRealm);
1148
1149    /**
1150     * Display password requirements and the command line argument option to modify these restrictions
1151     */
1152    @Message(id = Message.NONE, value = "Password requirements are listed below. To modify these restrictions edit the add-user.properties configuration file.")
1153    String passwordRequirements();
1154
1155    /**
1156     * Message stating command line supplied realm name in use.
1157     */
1158    @Message(id = Message.NONE, value = "Using realm '%s' as specified on the command line.")
1159    String userSuppliedRealm(final String realmName);
1160
1161    /**
1162     * Message stating discovered realm name in use.
1163     */
1164    @Message(id = Message.NONE, value = "Using realm '%s' as discovered from the existing property files.")
1165    String discoveredRealm(final String realmName);
1166
1167
1168
1169    //PUT YOUR NUMBERED MESSAGES ABOVE THE id=NONE ones!
1170}