{"id":8604,"date":"2013-08-22T13:38:17","date_gmt":"2013-08-22T18:38:17","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=8604"},"modified":"2013-08-22T16:34:37","modified_gmt":"2013-08-22T21:34:37","slug":"setup-sopaui-4-5-2-on-windows-client-for-kerberos-authentication","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=8604","title":{"rendered":"Setup sopaUI 4.5.2 on Windows Client for Kerberos Authentication"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Download_and_Install\">Download and Install<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Configure_soapUI_for_Kerberos_Authentication\">Configure soapUI for Kerberos Authentication<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Set_JAVA_HOME_Env_Var\">Set JAVA_HOME Env Var<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_login.conf_File\">Setup login.conf File<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_krb5.conf_File\">Setup krb5.conf File<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_soapui.bat_Script\">Setup soapui.bat Script<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Use_to_Consume_a_Test_Web_Service\">Use to Consume a Test Web Service<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Prerequisites\">Prerequisites<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Use_soapUI\">Use soapUI<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Download_and_Install\"><h2>Download and Install<\/h2><\/span>\n<p>* Download the nightly built from <a href=\"http:\/\/www.soapui.org\/Downloads\/soapui-nightly-builds.html\">here<\/a>. The official release does not seem to work. I downloaded Windows binary zip (no JRE).<br \/>\n* Unzip into a local directory.<\/p>\n<span id=\"Configure_soapUI_for_Kerberos_Authentication\"><h2>Configure soapUI for Kerberos Authentication<\/h2><\/span>\n<span id=\"Set_JAVA_HOME_Env_Var\"><h3>Set JAVA_HOME Env Var<\/h3><\/span>\n<p>* Set <strong>JAVA_HOME<\/strong> env var and point to your java home directory.<br \/>\nFor example, <em>JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_45<\/em><br \/>\n* Alternatively, you can set JAVA in <em>soapui.bat<\/em> script .<br \/>\n&#8211; Make sure the value is not quoted since the script will quote it later:<\/p>\n<pre lang=\"bash\">\r\nset JAVA=C:\\Program Files\\Java\\jdk1.6.0_45\\jre\\bin\\java\r\n<\/pre>\n<span id=\"Setup_login.conf_File\"><h3>Setup login.conf File<\/h3><\/span>\n<p>* Navigate to soapUI bin directory.<br \/>\n* Create a new file named <strong>login.conf<\/strong> with following content:<\/p>\n<pre lang=\"bash\">\r\ncom.sun.security.jgss.krb5.initiate {\r\n  com.sun.security.auth.module.Krb5LoginModule required \r\n  doNotPrompt=false\r\n  storePass=true\r\n  debug=false\r\n  useTicketCache=true;\r\n};\r\n<\/pre>\n<span id=\"Setup_krb5.conf_File\"><h3>Setup krb5.conf File<\/h3><\/span>\n<p>* Navigate to soapUI bin directory.<br \/>\n* Create a new file named <strong>krb5.conf<\/strong> with following content for Windows 2008 KDC:<\/p>\n<pre lang=\"bash\">\r\n[libdefaults]\r\n    default_realm = MYTEST.LOCAL\r\n    default_tkt_enctypes = rc4-hmac \r\n    default_tgt_enctypes = rc4-hmac \r\n    permitted_enctypes = rc4-hmac\r\n \r\n[realms]\r\n\tMYTEST.LOCAL  = {\r\n\t\tkdc = mytest.local \r\n\t\tdefault_domain = mytest \r\n}\r\n \r\n[domain_realm]\r\n\t.mytest = MYTEST.LOCAL \r\n<\/pre>\n<span id=\"Setup_soapui.bat_Script\"><h3>Setup soapui.bat Script<\/h3><\/span>\n<p>* Navigate to soapUI bin directory.<br \/>\n* Open <em>soapui.bat<\/em> file<br \/>\n* Add to set JAVA_OPTS section:<\/p>\n<pre lang=\"bash\">\r\nset JAVA_OPTS=%JAVA_OPTS% -Dwsi.dir=\"%SOAPUI_HOME%..\\wsi-test-tools\"\r\n\r\nset JAVA_OPTS=%JAVA_OPTS% -Djavax.security.auth.useSubjectCredsOnly=false\r\nset JAVA_OPTS=%JAVA_OPTS% -Djava.security.auth.login.config=login.conf\r\nset JAVA_OPTS=%JAVA_OPTS% -Djava.security.krb5.conf=krb5.conf\r\nrem set JAVA_OPTS=%JAVA_OPTS% -Djava.security.krb5.debug=true\r\n<\/pre>\n<span id=\"Use_to_Consume_a_Test_Web_Service\"><h2>Use to Consume a Test Web Service<\/h2><\/span>\n<span id=\"Prerequisites\"><h3>Prerequisites<\/h3><\/span>\n<p>* Log in Windows client machine as a regular domain user.<br \/>\n&#8211; Make sure you are <em>not<\/em> logged in as domain administrator.<br \/>\n* Check registry key <em>allowtgtsessionkey<\/em> is set to 1:<\/p>\n<pre lang=\"bash\">\r\nHKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Lsa\\Kerberos\\Parameters\r\nValue Name: allowtgtsessionkey\r\nValue Type: REG_DWORD\r\nValue: 0x01\r\n<\/pre>\n<span id=\"Use_soapUI\"><h3>Use soapUI<\/h3><\/span>\n<p>* Start soapUI by double clicking <em>soapui.bat<\/em> or running it from command shell.<br \/>\n* Create a regular soapUI project to hit the test web service.<br \/>\n* Make sure Authenticate Preemptively is not checked in <em>File > Preferences > HTTP Settings<\/em>:<\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_preemptive.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_preemptive-300x13.jpg\" alt=\"\" title=\"soapUI452_Request1_krb5_preemptive\" width=\"300\" height=\"13\" class=\"aligncenter size-medium wp-image-8608\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_preemptive-300x13.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_preemptive.jpg 497w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* If you are consuming HTTPS web services, make sure you set the trust store from <em>File > Preferences > SSL Settings<\/em>:<\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_truststore.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_truststore-300x55.jpg\" alt=\"\" title=\"soapUI452_Request1_krb5_truststore\" width=\"300\" height=\"55\" class=\"aligncenter size-medium wp-image-8605\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_truststore-300x55.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_truststore.jpg 783w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Open soap request window, e.g. <em>Request 1<\/em><br \/>\n* Click <em>Aut<\/em> button located to the lower left corner of the request window. Select or enter:<br \/>\n&#8211; Authorization Type: NTLM\/Kerberos<br \/>\n&#8211; Username: &lt;your user name here, e.g Jimmy.Li&gt;<br \/>\n&#8211; Password: &lt;leave blank, since authentication will use Windows Kerberos ticket&gt;<br \/>\n&#8211; Domain: &lt;leave blank, this could be used for cross domain Kerberos authentication&gt;<\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_aut.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_aut-300x284.jpg\" alt=\"\" title=\"soapUI452_Request1_krb5_aut\" width=\"300\" height=\"284\" class=\"aligncenter size-medium wp-image-8606\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_aut-300x284.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/08\/soapUI452_Request1_krb5_aut.jpg 576w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"?p=6716#IIS_Kerberos_Only_Authentication_Example\">IIS Kerberos Only Authentication Example<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Download and Install * Download the nightly built from here. The official release does not seem to work. I downloaded Windows binary zip (no JRE). * Unzip into a local directory. Configure soapUI for Kerberos Authentication Set JAVA_HOME Env Var &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=8604\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[287],"tags":[628,429],"class_list":["post-8604","post","type-post","status-publish","format-standard","hentry","category-kerberos","tag-kerberos","tag-soapui"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2eM","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8604"}],"version-history":[{"count":7,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8604\/revisions"}],"predecessor-version":[{"id":8611,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8604\/revisions\/8611"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}