How to enable vault on WildFly

  • create vault keystore

root@ubunu2004:/opt/wildfly/bin# keytool -genseckey -alias busa -storetype jceks -keyalg AES -keysize 256 -storepass union1234 -keypass union1234 -keystore vault.store

  • setup vault
root@ubunu2004:/opt/wildfly/bin# ./vault.sh --keystore ./vault/vault.store  --keystore-password union1234 --alias busa --vault-block vb --attribute password --sec-attr something --enc-dir ./vault/ --iteration 50 --salt 1234abcd
=========================================================================

  JBoss Vault

  JBOSS_HOME: /opt/wildfly

  JAVA: java

=========================================================================

Oct 08, 2020 9:24:25 AM org.picketbox.plugins.vault.PicketBoxSecurityVault init
INFO: PBOX00361: Default Security Vault Implementation Initialized and Ready
WFLYSEC0047: Secured attribute value has been stored in Vault.
Please make note of the following:
********************************************
Vault Block:vb
Attribute Name:password
Configuration should be done as follows:
VAULT::vb::password::1
********************************************
WFLYSEC0048: Vault Configuration commands in WildFly for CLI:
********************************************
For standalone mode:
/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "./vault/vault.store"),("KEYSTORE_PASSWORD" => "MASK-0FOV91/9idPaMgF3tkR9.V"),("KEYSTORE_ALIAS" => "busa"),("SALT" => "1234abcd"),("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "./vault/")])
********************************************
For domain mode:
/host=the_host/core-service=vault:add(vault-options=[("KEYSTORE_URL" => "./vault/vault.store"),("KEYSTORE_PASSWORD" => "MASK-0FOV91/9idPaMgF3tkR9.V"),("KEYSTORE_ALIAS" => "busa"),("SALT" => "1234abcd"),("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "./vault/")])
********************************************
  • run CLI command to add Vault Configuration
root@ubunu2004:/opt/wildfly# ./bin/jboss-cli.sh --connect controller=192.168.0.43:9990
[standalone@192.168.0.43:9990 /] /core-service=vault:add(vault-options=[("KEYSTORE_URL" => "/opt/wildfly/bin/vault/vault.store"),("KEYSTORE_PASSWORD" => "MASK-0FOV91/9idPaMgF3tkR9.V"),("KEYSTORE_ALIAS" => "busa"),("SALT" => "1234abcd"),("ITERATION_COUNT" => "50"),("ENC_FILE_DIR" => "/opt/wildfly/bin/vault/")])
{"outcome" => "success"}
  • verify the standalone.xml
    <vault>
        <vault-option name="KEYSTORE_URL" value="/opt/wildfly/bin/vault/vault.store"/>
        <vault-option name="KEYSTORE_PASSWORD" value="MASK-0FOV91/9idPaMgF3tkR9.V"/>
        <vault-option name="KEYSTORE_ALIAS" value="busa"/>
        <vault-option name="SALT" value="1234abcd"/>
        <vault-option name="ITERATION_COUNT" value="50"/>
        <vault-option name="ENC_FILE_DIR" value="/opt/wildfly/bin/vault/"/>
    </vault>

49 Replies to “How to enable vault on WildFly”

  1. I really wanted to make a small comment in order to say thanks to you for all the unique information you are placing here. My time-consuming internet investigation has now been paid with professional content to write about with my friends. I would admit that most of us visitors actually are really fortunate to live in a decent community with many wonderful individuals with useful secrets. I feel extremely lucky to have encountered your entire webpage and look forward to tons of more thrilling moments reading here. Thank you again for everything. Ashlie Randy Vachil

  2. Hi there. I found your site by means of Google whilst searching for a comparable topic, your site got here up. It appears to be good. I have bookmarked it in my google bookmarks to visit then. Anastassia Felic Chessy

  3. My brother recommended I would possibly like this website. He was once entirely right. This post truly made my day. You can not imagine just how so much time I had spent for this info! Thanks! Rozina Linn Bone

  4. Greetings! Very useful advice in this particular post! It is the little changes that will make the biggest changes. Thanks a lot for sharing! Amalita Adolpho Hafler

  5. Just wish to say your article is as amazing. The clearness in your post is simply cool and i can assume you are an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please keep up the rewarding work. Franciska Northrup Porush

  6. Simply desire to say your article is as astonishing. The clearness in your post is simply excellent and i could assume you are an expert on this subject. Well with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the enjoyable work. Bree Morgan Monroy

  7. I needed to draft you that tiny remark to be able to say thanks a lot over again on the pleasing solutions you have provided in this case. It was really shockingly open-handed with you to grant publicly precisely what many of us might have offered for an ebook to get some dough for themselves, notably now that you might have tried it in case you desired. These smart ideas as well served to be the good way to fully grasp that other people online have the identical interest really like my personal own to learn more related to this matter. I am sure there are numerous more pleasant periods in the future for many who read your site. Almira Ruy Ligetti

  8. Someone necessarily assist to make significantly articles I might state. This is the very first time I frequented your website page and so far? I amazed with the research you made to make this actual put up incredible. Great process! Laureen Teodor Jeffy

  9. Thanks for your whole work on this website. My niece takes pleasure in working on research and it is simple to grasp why. We all notice all relating to the powerful ways you render worthwhile tricks via your website and therefore welcome response from website visitors on this topic while our own simple princess is without question understanding so much. Take pleasure in the rest of the year. Your performing a wonderful job. Rebekkah Maurits Nahama

  10. Thanks for sharing superb informations. Your web site is so cool. I am impressed by the details that you have on this blog. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched all over the place and just could not come across. What a perfect website. Alana Seth Georgy

  11. Everything is very open with a really clear explanation of the challenges. It was really informative. Your site is useful. Many thanks for sharing! Andra Gilburt Cimbura

  12. Greetings! Very useful advice in this particular article! It is the little changes that will make the most important changes. Many thanks for sharing! Viki Sullivan Baptiste

  13. Having read this I believed it was very enlightening. I appreciate you finding the time and effort to put this informative article together. I once again find myself personally spending way too much time both reading and leaving comments. But so what, it was still worthwhile! Terrijo Jefferey Hemphill

  14. Nice post. I learn something new and challenging on sites I stumbleupon on a daily basis. It will always be useful to read content from other writers and use something from other web sites. Letta Ade Diley

  15. Hiya, I am really glad I have found this info. Nowadays bloggers publish only about gossip and internet stuff and this is really frustrating. A good blog with exciting content, that is what I need. Thanks for making this web-site, and I will be visiting again. Do you do newsletters by email? Nerita Mylo Tiler

  16. I simply could not go away your site before suggesting that I extremely loved the standard info an individual provide in your visitors? Is gonna be back regularly to check out new posts Yetta Jeremie Judy

  17. I really like your blog site.. very good colors & theme.
    Would you create this website yourself or have you hire someone to accomplish
    it to suit your needs? Plz respond as I’m planning to construct my blog and wish to know where u got this from.

    thanks

    Here is my web-site … JanethGCoyne

  18. Do you mind if I quote a couple of your posts as long as I provide credit and sources
    back to your webpage? My blog is in the exact same area of interest as yours and my
    visitors would certainly benefit from a lot of the information you present here.
    Please let me know if this okay with you. Regards!

  19. We are a group of volunteers and opening a new scheme in our
    community. Your website provided us with valuable information to work on. You’ve done an impressive job
    and our entire community will be grateful to you.

  20. Hey there! I could have sworn I’ve been to this website before but after
    reading through some of the post I realized it’s new to me.
    Nonetheless, I’m definitely happy I found it
    and I’ll be book-marking and checking back frequently!

  21. I was recommended this web site via my cousin.
    I am now not sure whether or not this publish is written by means of him as nobody else
    know such distinctive approximately my trouble. You’re amazing!
    Thank you!

  22. Hiya, I’m really glad I’ve found this information. Today bloggers
    publish only about gossips and net and this is really
    frustrating. A good blog with exciting content, that is what I need.
    Thanks for keeping this site, I’ll be visiting it. Do you do
    newsletters? Can not find it.

    my web page – Rhino Spark Ingredients

  23. Just want to say your article is as surprising. The clearness on your publish is just spectacular and that i can think you are knowledgeable in this subject. Well with your permission let me to snatch your RSS feed to keep updated with coming near near post. Thank you one million and please carry on the gratifying work.

Leave a Reply

Your email address will not be published. Required fields are marked *