{"id":567,"date":"2017-11-23T12:25:22","date_gmt":"2017-11-23T11:25:22","guid":{"rendered":"http:\/\/itblog.inginea.eu\/?p=567"},"modified":"2024-05-07T15:30:55","modified_gmt":"2024-05-07T13:30:55","slug":"configure-passwords-in-payara-server-and-glassfish","status":"publish","type":"post","link":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/","title":{"rendered":"Configure Payara Server passwords in Docker"},"content":{"rendered":"\n<p>Answering Stackoverflow questions provides a great feedback for finding out gaps in the official documentation of my favourite opensource tools. One of the questions which I answered here was how to <a href=\"https:\/\/stackoverflow.com\/a\/47453368\/784594\">change Payara Server master password in docker container<\/a>. Obviously, in a standard server installation, this is simple &#8211; just use the&nbsp;<span class=\"lang:java decode:true crayon-inline \">asadmin change-master-password<\/span>&nbsp; command, then type the old and new password in to the console and it&#8217;s done. Not in docker though, where the configuration has to be automated by a script. The same applies to all infrastructure-as-a-code solutions like Chef or Puppet. So I had to dig deeper into the documentation and experiment a bit.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Specifying passwords from file<\/h2>\n\n\n\n<p>The key thing in working with passwords in scripts is to provide them in a file. Each asadmin command accepts argument <span class=\"lang:java decode:true crayon-inline\"><code>--passwordfile<\/code><\/span>&nbsp; to instruct it to read all the necessary passwords from it to avoid asking for passwords interactively. But it&#8217;s a bit tricky to find out how to define passwords in this password file, because it&#8217;s used for multiple types of passwords. Oracle documentation for GlassFish v3 which also applies to GlassFish v4 and v5 and Payara v4 and v5 <a href=\"https:\/\/docs.oracle.com\/cd\/E18930_01\/html\/821-2435\/ghgrp.html#ghytn\">documents 4 types of passwords<\/a>. Each type of password can be specified in the password file with a variable that starts with the <span class=\"lang:java decode:true crayon-inline\">AS_ADMIN_<\/span>&nbsp; prefix.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>admin password with prefix <span class=\"lang:java decode:true crayon-inline\"><code>AS_ADMIN_PASSWORD<\/code><\/span>, default is empty password<\/li>\n\n\n\n<li>master password with prefix <span class=\"lang:java decode:true crayon-inline\"><code>AS_ADMIN_MASTERPASSWORD<\/code><\/span> , default is &#8220;changeit&#8221;<\/li>\n\n\n\n<li>user password with prefix <span class=\"lang:java decode:true crayon-inline\"><code>AS_ADMIN_USERPASSWORD<\/code><\/span><\/li>\n\n\n\n<li>alias password with prefix <span class=\"lang:java decode:true crayon-inline\"><code>AS_ADMIN_ALIASPASSWORD<\/code><\/span><\/li>\n<\/ul>\n\n\n\n<p>So for example, if we need to run a command with admin password &#8220;mypassword&#8221;, the following line has to be in the password file:<\/p>\n\n\n<pre class=\"wp-block-code lang:java decode:true\"><span><code class=\"hljs\">AS_ADMIN_PASSWORD=mypassword<\/code><\/span><\/pre>\n\n\n<p>And then we can use the password with the&nbsp;<span class=\"lang:java decode:true crayon-inline \"><code>--passwordfile<\/code><\/span> argument, like this:<\/p>\n\n\n<pre class=\"wp-block-code lang:java decode:true\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">asadmin <span class=\"hljs-keyword\">list<\/span>-applications --passwordfile=mypasswordfile<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The above command won&#8217;t wait for typing the password but will immediately list all applications on the server. If the password is incorrect, the command would fail.<\/p>\n\n\n\n<div class=\"wp-block-group omnifish-advert has-white-color has-text-color has-background\" style=\"background-color:#0b8f9b\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-color has-text-color\" style=\"grid-template-columns:auto 15%\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-medium-font-size\"><a rel=\"noreferrer noopener\" href=\"https:\/\/omnifish.ee\" data-type=\"URL\" data-id=\"https:\/\/omnifish.ee\" target=\"_blank\"><strong>Need help with GlassFish, Jakarta\u00a0EE, Java in the cloud?<\/strong><\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/omnifish.ee\" data-type=\"URL\" data-id=\"https:\/\/omnifish.ee\" target=\"_blank\">Follow me at <strong>OmniFish<\/strong>! <\/a><\/p>\n<\/div><figure class=\"wp-block-media-text__media\"><a href=\"https:\/\/omnifish.ee\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"178\" data-attachment-id=\"1034\" data-permalink=\"https:\/\/ondro.inginea.eu\/omnifish-logo-transparent-400px\/\" data-orig-file=\"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2022\/07\/omnifish-logo-transparent-400px.png?fit=400%2C237&amp;ssl=1\" data-orig-size=\"400,237\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"omnifish-logo-transparent-400px\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2022\/07\/omnifish-logo-transparent-400px.png?fit=300%2C178&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2022\/07\/omnifish-logo-transparent-400px.png?fit=400%2C237&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2022\/07\/omnifish-logo-transparent-400px.png?resize=300%2C178&#038;ssl=1\" alt=\"\" class=\"wp-image-1034 size-medium\" srcset=\"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2022\/07\/omnifish-logo-transparent-400px.png?resize=300%2C178&amp;ssl=1 300w, https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2022\/07\/omnifish-logo-transparent-400px.png?w=400&amp;ssl=1 400w\" sizes=\"(max-width: 300px) 100vw, 300px\" data-recalc-dims=\"1\" \/><\/a><\/figure><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Changing passwords non-interactively from script<\/h2>\n\n\n\n<p>So far, all was documented at least in the old GlassFish v3 documentation. What&#8217;s missing in the documentation though is how to specify a new password from file if we want to change it from a script. When we execute a command to change any password (e.g. admin password or master password) without a password file, the command would ask for 2 passwords &#8211; the old one and the new one. Therefore we need to specify 2 passwords in a file.<\/p>\n\n\n\n<p>The solution is to add another variable for a new password into the same password file. Variables for new passwords are prefixed with <span class=\"lang:java decode:true crayon-inline\">AS_ADMIN_NEW<\/span>&nbsp; prefix. Therefore to change the master password, we need the following 2 lines in our password file:<\/p>\n\n\n<pre class=\"wp-block-code lang:java decode:true\"><span><code class=\"hljs\">AS_ADMIN_MASTERPASSWORD=oldmasterpassword\nAS_ADMIN_NEWMASTERPASSWORD=newmasterpassword<\/code><\/span><\/pre>\n\n\n<p>And then we can use the 2 passwords with the&nbsp;<span class=\"lang:java decode:true crayon-inline \">&#8211;passwordfile<\/span> argument, like this:<\/p>\n\n\n<pre class=\"wp-block-code lang:java decode:true\"><span><code class=\"hljs\">asadmin change-master-password --passwordfile=mypasswordfile<\/code><\/span><\/pre>\n\n\n<p>The above command won&#8217;t wait for typing or retyping any password but will immediately change the master password on the server to <span class=\"lang:java decode:true crayon-inline \">newmasterpassword<\/span>&nbsp;. If the old password is incorrect, the command would fail.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Changing passwords in docker image<\/h2>\n\n\n\n<p>In Docker, the preferred way is to configure the server in the image so that when a container is executed, the configuration is applied automatically. Avoid configuring containers because it&#8217;s not easy to run asadmin commands in a container and changing some passwords, such as master password, requires server restart.<\/p>\n\n\n\n<p>The default <a href=\"https:\/\/hub.docker.com\/r\/payara\/server-full\/~\/dockerfile\/\">Payara Server Docker image<\/a> already contains asadmin commands which change the admin password. You can copy the lines that create&nbsp;<span class=\"lang:java decode:true crayon-inline \">\/opt\/tmpfile<\/span>&nbsp; and use it with the&nbsp;<span class=\"lang:java decode:true crayon-inline \">change-admin-password<\/span>&nbsp; command to change the admin password.<\/p>\n\n\n\n<p>The same can be done to change the master password. Below is an example custom Dockerfile to change the master password to <span class=\"lang:java decode:true crayon-inline \">newpassword<\/span>&nbsp;:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Dockerfile\" data-shcb-language-slug=\"dockerfile\"><span><code class=\"hljs language-dockerfile\"><span class=\"hljs-keyword\">FROM<\/span> payara\/server-full\n<span class=\"hljs-comment\"># specify a new master password \"newpassword\" instead of the default password \"changeit\"<\/span>\n<span class=\"hljs-keyword\">RUN<\/span><span class=\"bash\"> <span class=\"hljs-built_in\">echo<\/span> <span class=\"hljs-string\">'AS_ADMIN_MASTERPASSWORD=changeit\\nAS_ADMIN_NEWMASTERPASSWORD=newpassword'<\/span> &gt;&gt; \/opt\/masterpwdfile<\/span>\n\n<span class=\"hljs-comment\"># execute asadmin command to apply the new master password<\/span>\n<span class=\"hljs-keyword\">RUN<\/span><span class=\"bash\"> <span class=\"hljs-variable\">${PAYARA_PATH}<\/span>\/bin\/asadmin change-master-password --passwordfile=\/opt\/masterpwdfile<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Dockerfile<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">dockerfile<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>With the above Dockerfile in your current directory, you can build your custom docker image with:<\/p>\n\n\n<pre class=\"wp-block-code lang:java decode:true\"><span><code class=\"hljs\">docker build -t my-payara\/server-full .<\/code><\/span><\/pre>\n\n\n<p>And then run <span class=\"lang:java decode:true crayon-inline \">my-payara\/server-full<\/span>&nbsp; instead of payara\/server-full.<\/p>\n\n\n\n<p>You can verify that the master password is changed in the docker container when you run it with:<\/p>\n\n\n<pre class=\"wp-block-code lang:java decode:true\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">docker run -t -i --entrypoint keytool payara\/server-full:masterpwd -<span class=\"hljs-keyword\">list<\/span> -keystore \/opt\/payara41\/glassfish\/domains\/domain1\/config\/keystore.jks<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If you type the new master password, you should see the contents of the key store with the list of certifictes.<\/p>\n\n\n\n<p><strong>NOTE: <\/strong>After you change the master password, the Docker image will still run Payara with the old master password, which is not the correct password and Payara will not start. After you change the master password, you also need to update the value of <code>AS_ADMIN_MASTERPASSWORD<\/code> in the file <code>${PASSWORD_FILE}<\/code> (<code>\/opt\/payara\/passwordFile<\/code>) to the value of the new master password, so that Payara is started with the new password.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>Republished at: <a href=\"https:\/\/www.javacodegeeks.com\/2017\/11\/configure-passwords-payara-server-glassfish.html\" data-type=\"URL\" data-id=\"https:\/\/www.javacodegeeks.com\/2017\/11\/configure-passwords-payara-server-glassfish.html\" target=\"_blank\" rel=\"noreferrer noopener\">JavaCodeGeeks.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Answering Stackoverflow questions provides a great feedback for finding out gaps in the official documentation of my favourite opensource tools. One of the questions which I answered here was how to change Payara Server master password in docker container. Obviously, in a standard server installation, this is simple &#8211; just use the&nbsp;asadmin change-master-password&nbsp; command, then [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[111],"tags":[173,169,104,171],"series":[],"class_list":["post-567","post","type-post","status-publish","format-standard","hentry","category-payara","tag-docker","tag-passwords","tag-payara","tag-security"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Configure Payara Server passwords in Docker - .Lost in Coding<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configure Payara Server passwords in Docker - .Lost in Coding\" \/>\n<meta property=\"og:description\" content=\"Answering Stackoverflow questions provides a great feedback for finding out gaps in the official documentation of my favourite opensource tools. One of the questions which I answered here was how to change Payara Server master password in docker container. Obviously, in a standard server installation, this is simple &#8211; just use the&nbsp;asadmin change-master-password&nbsp; command, then [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\" \/>\n<meta property=\"og:site_name\" content=\".Lost in Coding\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ondrej.mihalyi\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ondrej.mihalyi\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-23T11:25:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-07T13:30:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2021\/09\/duke-CloudSurf-small-e1637277171314.png?fit=300%2C202&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"202\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ondro Mih\u00e1lyi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/OndroMih\" \/>\n<meta name=\"twitter:site\" content=\"@OndroMih\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ondro Mih\u00e1lyi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\"},\"author\":{\"name\":\"Ondro Mih\u00e1lyi\",\"@id\":\"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616\"},\"headline\":\"Configure Payara Server passwords in Docker\",\"datePublished\":\"2017-11-23T11:25:22+00:00\",\"dateModified\":\"2024-05-07T13:30:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\"},\"wordCount\":748,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616\"},\"keywords\":[\"docker\",\"passwords\",\"Payara\",\"security\"],\"articleSection\":[\"Payara\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\",\"url\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\",\"name\":\"Configure Payara Server passwords in Docker - .Lost in Coding\",\"isPartOf\":{\"@id\":\"https:\/\/ondro.inginea.eu\/#website\"},\"datePublished\":\"2017-11-23T11:25:22+00:00\",\"dateModified\":\"2024-05-07T13:30:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ondro.inginea.eu\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure Payara Server passwords in Docker\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ondro.inginea.eu\/#website\",\"url\":\"https:\/\/ondro.inginea.eu\/\",\"name\":\".Lost in Coding\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ondro.inginea.eu\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616\",\"name\":\"Ondro Mih\u00e1lyi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ondro.inginea.eu\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i2.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2017\/08\/fotoOMsquare3x300.jpg?fit=300%2C300&ssl=1\",\"contentUrl\":\"https:\/\/i2.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2017\/08\/fotoOMsquare3x300.jpg?fit=300%2C300&ssl=1\",\"width\":300,\"height\":300,\"caption\":\"Ondro Mih\u00e1lyi\"},\"logo\":{\"@id\":\"https:\/\/ondro.inginea.eu\/#\/schema\/person\/image\/\"},\"description\":\"Ondro is a software developer and consultant specializing in combining standard and proven tools to solve new and challenging problems. He's been developing in Java for over 10 years. He\u2019s worked for clients like Payara, LottoLand, Uniqa and others. He has co-founded OmniFish, where he works as a director and Jakarta EE expert. He\u2019s passionate about helping his clients and the wider Java community with their projects based on Jakarta EE and similar technologies. As an experienced Java developer and instructor, he's helped companies build and educate their development teams and improve their development processes. He's a core member of several opensource projects and Jakarta EE specification projects. He\u2019s a frequent conference speaker, leader of the Czech JUG and a Java Champion. Ondro is a regular conference speaker at international conferences. Since 2016, he's presented at the following conferences: \u2022 FOSDEM, Brussels, Belgium 2023) \u2022 JChampionsConf, Online (year 2023) \u2022 EclipseCon, Germany (year 2022) \u2022 GeeCon, Prague, Czechia (years 2016, 2019, 2022) \u2022 JavaLand, Bruehl, Germany (years 2018, 2021) \u2022 JFokus, Stockholm, Sweden (year 2019) \u2022 Devops Con, Munich, Germany (year 2019) \u2022 Oracle CodeOne, San Francisco, USA (years 2018, 2019) \u2022 Devoxx, Antwerp, Belgium (year 2018) \u2022 JPrime, Sofia, Bulgaria (years 2017, 2018) \u2022 Java2Days, Sofia, Bulgaria (years 2016, 2018) \u2022 EclipseCon, France (year 2018) \u2022 JavaOne, San Francisco, USA (years 2016, 2017) \u2022 Oracle Code, Prague, Czechia (year 2017) \u2022 Devoxx, London, UK (year 2017) \u2022 GeeCon, Krakow, Poland (year 2017) \u2022 W-JAX, Munich, Germany (years 2016, 2017) \u2022 Bed-Con, Berlin, Germany (year 2017) \u2022 Oredev, Malmo, Sweden (year 2017) \u2022 Devoxx, Casablanca, Morocco (year 2017) \u2022 Java Developer Days, Krakow, Poland (year 2016)\",\"sameAs\":[\"https:\/\/www.facebook.com\/ondrej.mihalyi\",\"https:\/\/cz.linkedin.com\/in\/mihalyiondrej\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/OndroMih\"],\"url\":\"https:\/\/ondro.inginea.eu\/index.php\/author\/ondrejm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configure Payara Server passwords in Docker - .Lost in Coding","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/","og_locale":"en_US","og_type":"article","og_title":"Configure Payara Server passwords in Docker - .Lost in Coding","og_description":"Answering Stackoverflow questions provides a great feedback for finding out gaps in the official documentation of my favourite opensource tools. One of the questions which I answered here was how to change Payara Server master password in docker container. Obviously, in a standard server installation, this is simple &#8211; just use the&nbsp;asadmin change-master-password&nbsp; command, then [&hellip;]","og_url":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/","og_site_name":".Lost in Coding","article_publisher":"https:\/\/www.facebook.com\/ondrej.mihalyi","article_author":"https:\/\/www.facebook.com\/ondrej.mihalyi","article_published_time":"2017-11-23T11:25:22+00:00","article_modified_time":"2024-05-07T13:30:55+00:00","og_image":[{"width":300,"height":202,"url":"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2021\/09\/duke-CloudSurf-small-e1637277171314.png?fit=300%2C202&ssl=1","type":"image\/png"}],"author":"Ondro Mih\u00e1lyi","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/OndroMih","twitter_site":"@OndroMih","twitter_misc":{"Written by":"Ondro Mih\u00e1lyi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#article","isPartOf":{"@id":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/"},"author":{"name":"Ondro Mih\u00e1lyi","@id":"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616"},"headline":"Configure Payara Server passwords in Docker","datePublished":"2017-11-23T11:25:22+00:00","dateModified":"2024-05-07T13:30:55+00:00","mainEntityOfPage":{"@id":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/"},"wordCount":748,"commentCount":5,"publisher":{"@id":"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616"},"keywords":["docker","passwords","Payara","security"],"articleSection":["Payara"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/","url":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/","name":"Configure Payara Server passwords in Docker - .Lost in Coding","isPartOf":{"@id":"https:\/\/ondro.inginea.eu\/#website"},"datePublished":"2017-11-23T11:25:22+00:00","dateModified":"2024-05-07T13:30:55+00:00","breadcrumb":{"@id":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ondro.inginea.eu\/index.php\/configure-passwords-in-payara-server-and-glassfish\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ondro.inginea.eu\/"},{"@type":"ListItem","position":2,"name":"Configure Payara Server passwords in Docker"}]},{"@type":"WebSite","@id":"https:\/\/ondro.inginea.eu\/#website","url":"https:\/\/ondro.inginea.eu\/","name":".Lost in Coding","description":"","publisher":{"@id":"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ondro.inginea.eu\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ondro.inginea.eu\/#\/schema\/person\/07ac1158ec74720744f7146572215616","name":"Ondro Mih\u00e1lyi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ondro.inginea.eu\/#\/schema\/person\/image\/","url":"https:\/\/i2.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2017\/08\/fotoOMsquare3x300.jpg?fit=300%2C300&ssl=1","contentUrl":"https:\/\/i2.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2017\/08\/fotoOMsquare3x300.jpg?fit=300%2C300&ssl=1","width":300,"height":300,"caption":"Ondro Mih\u00e1lyi"},"logo":{"@id":"https:\/\/ondro.inginea.eu\/#\/schema\/person\/image\/"},"description":"Ondro is a software developer and consultant specializing in combining standard and proven tools to solve new and challenging problems. He's been developing in Java for over 10 years. He\u2019s worked for clients like Payara, LottoLand, Uniqa and others. He has co-founded OmniFish, where he works as a director and Jakarta EE expert. He\u2019s passionate about helping his clients and the wider Java community with their projects based on Jakarta EE and similar technologies. As an experienced Java developer and instructor, he's helped companies build and educate their development teams and improve their development processes. He's a core member of several opensource projects and Jakarta EE specification projects. He\u2019s a frequent conference speaker, leader of the Czech JUG and a Java Champion. Ondro is a regular conference speaker at international conferences. Since 2016, he's presented at the following conferences: \u2022 FOSDEM, Brussels, Belgium 2023) \u2022 JChampionsConf, Online (year 2023) \u2022 EclipseCon, Germany (year 2022) \u2022 GeeCon, Prague, Czechia (years 2016, 2019, 2022) \u2022 JavaLand, Bruehl, Germany (years 2018, 2021) \u2022 JFokus, Stockholm, Sweden (year 2019) \u2022 Devops Con, Munich, Germany (year 2019) \u2022 Oracle CodeOne, San Francisco, USA (years 2018, 2019) \u2022 Devoxx, Antwerp, Belgium (year 2018) \u2022 JPrime, Sofia, Bulgaria (years 2017, 2018) \u2022 Java2Days, Sofia, Bulgaria (years 2016, 2018) \u2022 EclipseCon, France (year 2018) \u2022 JavaOne, San Francisco, USA (years 2016, 2017) \u2022 Oracle Code, Prague, Czechia (year 2017) \u2022 Devoxx, London, UK (year 2017) \u2022 GeeCon, Krakow, Poland (year 2017) \u2022 W-JAX, Munich, Germany (years 2016, 2017) \u2022 Bed-Con, Berlin, Germany (year 2017) \u2022 Oredev, Malmo, Sweden (year 2017) \u2022 Devoxx, Casablanca, Morocco (year 2017) \u2022 Java Developer Days, Krakow, Poland (year 2016)","sameAs":["https:\/\/www.facebook.com\/ondrej.mihalyi","https:\/\/cz.linkedin.com\/in\/mihalyiondrej","https:\/\/twitter.com\/https:\/\/twitter.com\/OndroMih"],"url":"https:\/\/ondro.inginea.eu\/index.php\/author\/ondrejm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6wlb6-99","jetpack-related-posts":[{"id":330,"url":"https:\/\/ondro.inginea.eu\/index.php\/payara-update-may-2016\/","url_meta":{"origin":567,"position":0},"title":"Payara update &#8211; May 2016","author":"Ondro Mih\u00e1lyi","date":"30 May, 2016","format":false,"excerpt":"In March, I've started working for Payara and I've definitely enjoyed it since then. It's been very refreshing. I really love all the new experience, including the startup-like company culture (have a look at the courageous company web site) being part of the Payara open-source project and community helping customers\u2026","rel":"","context":"In &quot;Payara&quot;","block_context":{"text":"Payara","link":"https:\/\/ondro.inginea.eu\/index.php\/category\/payara\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/6QVBsH6IjEA\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":311,"url":"https:\/\/ondro.inginea.eu\/index.php\/started-working-as-payara-engineer\/","url_meta":{"origin":567,"position":1},"title":"Started working as Payara engineer","author":"Ondro Mih\u00e1lyi","date":"3 April, 2016","format":false,"excerpt":"Recently I made a small shift in my career, exchanging series of jobs and projects as a Java developer for a job to support and promote a great open-source product - Payara server. I made a leap from a developer who just enjoys the quality of lots of open-source software,\u2026","rel":"","context":"In &quot;Events &amp; Conferences&quot;","block_context":{"text":"Events &amp; Conferences","link":"https:\/\/ondro.inginea.eu\/index.php\/category\/events-conferences\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":533,"url":"https:\/\/ondro.inginea.eu\/index.php\/using-hotswapagent-to-speed-up-development\/","url_meta":{"origin":567,"position":2},"title":"Using HotswapAgent to speed up development","author":"Ondro Mih\u00e1lyi","date":"20 October, 2017","format":false,"excerpt":"As a Java EE developer, I sometimes envy how fast it's possible to see the result of a code change in a running application with interpreted languages like PHP or JavaScript. With Java, it's always necessary to rebuild the source code in a bytecode, which can be then safely updated\u2026","rel":"","context":"In &quot;Configuration&quot;","block_context":{"text":"Configuration","link":"https:\/\/ondro.inginea.eu\/index.php\/category\/config\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ondro.inginea.eu\/wp-content\/uploads\/2017\/09\/Screenshot-from-DCEVM.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":365,"url":"https:\/\/ondro.inginea.eu\/index.php\/my-recent-talks-at-jug-in-prague\/","url_meta":{"origin":567,"position":3},"title":"My recent talks at JUG in Prague","author":"Ondro Mih\u00e1lyi","date":"29 July, 2016","format":false,"excerpt":"In June, I had a public presentation at a Java User Group in Prague. It was the first time I gave my new talk about building reactive applications with Java EE. And as a bonus, I wanted to introduce Payara project and how it relates to the GlassFish project.I was\u2026","rel":"","context":"In &quot;Events &amp; Conferences&quot;","block_context":{"text":"Events &amp; Conferences","link":"https:\/\/ondro.inginea.eu\/index.php\/category\/events-conferences\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/ZdhGuoTYOIE\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":806,"url":"https:\/\/ondro.inginea.eu\/index.php\/possible-ways-to-use-arquillian-in-jakarta-ee-tcks\/","url_meta":{"origin":567,"position":4},"title":"Possible ways to use Arquillian in Jakarta EE TCKs","author":"Ondro Mih\u00e1lyi","date":"12 April, 2020","format":false,"excerpt":"Recently, we had a discussion how to create a standalone Jakarta Batch test kit (TCK). For most of the committers, it's pretty natural to use Arquillian to abstracts tests away from how they are executed on an implementation. But Romain proposed an intriguing idea to use plain JUnit5 that got\u2026","rel":"","context":"In &quot;Jakarta EE&quot;","block_context":{"text":"Jakarta EE","link":"https:\/\/ondro.inginea.eu\/index.php\/category\/java\/jakarta-ee\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":209,"url":"https:\/\/ondro.inginea.eu\/index.php\/mvc-1-0-in-java-ee-8-getting-started-using-facelets\/","url_meta":{"origin":567,"position":5},"title":"MVC 1.0 in Java EE 8: Getting started using facelets","author":"Ondro Mih\u00e1lyi","date":"19 January, 2016","format":false,"excerpt":"MVC 1.0 is an action-based Model-View-Controller web framework, which will be a part of future Java EE 8. It will live side by side with component-based JSF framework and will provide an alternative for building HTML+javascript oriented applications with full control over URLs. This post summarizes what needs to be\u2026","rel":"","context":"In &quot;Jakarta EE&quot;","block_context":{"text":"Jakarta EE","link":"https:\/\/ondro.inginea.eu\/index.php\/category\/java\/jakarta-ee\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/posts\/567"}],"collection":[{"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":12,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":1151,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/posts\/567\/revisions\/1151"}],"wp:attachment":[{"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/categories?post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/tags?post=567"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ondro.inginea.eu\/index.php\/wp-json\/wp\/v2\/series?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}