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