text: /*! For license information please see ea313555.0586875e.js.LICENSE.txt */
  (window.webpackJsonp=window.webpackJsonp||[]).push([[427],{493:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return l})),n.d(t,"toc",(function(){return c})),n.d(t,"default",(function(){return b}));var r=n(3),o=n(8),a=(n(0),n(553)),s=n(719),i={id:"faq",title:"Frequently Asked Questions (FAQ)"},l={unversionedId:"faq",id:"faq",isDocsHomePage:!1,title:"Frequently Asked Questions (FAQ)",description:"<FaqTags",source:"@site/docs/faq.mdx",sourceDirName:".",slug:"/faq",permalink:"/kratos/docs/next/faq",editUrl:"https://github.com/ory/kratos/edit/master/docs/docs/faq.mdx",version:"current",lastUpdatedBy:"aeneasr",lastUpdatedAt:1617188860,formattedLastUpdatedAt:"3/31/2021",frontMatter:{id:"faq",title:"Frequently Asked Questions (FAQ)"},sidebar:"docs",previous:{title:"Contribution Guidelines",permalink:"/kratos/docs/next/contributing"},next:{title:"Overview",permalink:"/kratos/docs/next/concepts/index"}},c=[],u={toc:c};function b(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(r.a)({},u,n,{components:t,mdxType:"MDXLayout"}),Object(a.b)(s.a,{tags:["kratos","secrets","config","database","ecosystem","user","validation","traits","registration","cors","feature","hooks","migration","security","oidc","spa"],initiallyDisabled:["kratos"],mdxType:"FaqTags"}),Object(a.b)("br",null),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","secrets","config"],mdxType:"Question"},"#kratos #secrets #config",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": Is it possible to pass multiple system.secret values through the ENV, or do you have to use a config file for that?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": Yes, you can set them as environmental variable, you just have to separate them using a ",Object(a.b)("code",null,","),". More info on these conventions in the documentation:"," ",Object(a.b)("a",{href:"https://www.ory.sh/docs/ecosystem/configuring/#stringnumeric-arrays"},"Setting configuration values via environmental variables"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","database"],mdxType:"Question"},"#kratos #database",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": We want to seperate our customers and employees, so we store them in different databases. But we would like to have them use the same login dialog for our portal. How can I achieve that with Ory Kratos?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": You can deploy Ory Kratos two times, and use the same login UI pointing to two different Kratos login endpoints -"," ",Object(a.b)("code",null,"/login/customer")," or ",Object(a.b)("code",null,"/login/employee"),", either by having two different login routes, or by adding some logic to your login UI that reroutes customers to ",Object(a.b)("code",null,"/login/customer")," and employees to"," ",Object(a.b)("code",null,"/login/employee"),". So you define the same login or registration UI URLs in both of the Kratos configurations. You may need to tell your login/registration UI which Kratos it is supposed to talk to. The instances are cheap to deploy and the databases are completely isolated from each other. For example something like ",Object(a.b)("code",null,"/login/customer")," and"," ",Object(a.b)("code",null,"/login/employee"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","ecosystem"],mdxType:"Question"},"#kratos #ecosystem",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": Is the code audited by an independent entity and is there a bug bounty program?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": We will do that when the APIs and core are stable. A bug bounty program is in the making but not done yet. If you are a security researcher and interested in working on Kratos, please reach out to"," ",Object(a.b)("a",{href:"mailto:security@ory.sh"},"security@ory.sh"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","user","validation","traits"],mdxType:"Question"},"#kratos #user #validation #traits",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": What is the correct flow to sanitize the username and make sure it satisfies a specific regex (e.g. only alphanumeric characters)?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": In the identity json schema using"," ",Object(a.b)("a",{href:"https://json-schema.org/understanding-json-schema/reference/string.html#regular-expressions"},"Regular Expressions"),". To sanitize usernames coming from third-party OIDC providers like Google or GitHub you write ",Object(a.b)("a",{href:"https://jsonnet.org"},"jsonnet code"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","registration","cors"],mdxType:"Question"},"#kratos #registration #cors",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": I am currently trying to get the Kratos registration flow working on a react app that I am creating. I am having CORS issues with the completeSelfServiceRegistrationFlowWithPasswordMethod call when using the @oryd/kratos-client JS package."),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": You are using AJAX to submit the form. This is not supported right now. You need to submit a regular HTML form. Do not use AJAX. Do not use fetch. Let the user click the submit button and do not do anything. AJAX will be better supported starting Kratos v0.6.")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","traits","feature"],mdxType:"Question"},"#kratos #traits #feature",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": Is the ability to freeze certain identity fields after registration anywhere on the roadmap? Also I want read-only or hidden user-specific data. Can I use traits for that? Example: Some of our identity trait fields may be the subject to identity validation (",Object(a.b)("a",{href:"https://en.wikipedia.org/wiki/Know_your_customer"},"know your customer"),"). Once they are validated we do not allow the identity to be edited by the end-user."),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": Currently traits are visible to the user and also editable by them. It makes sense to have read-only and/or hidden traits for users, but we can not give an exact timing when this will be available. There is an open issue for this feature:",Object(a.b)("a",{href:"https://github.com/ory/kratos/issues/47"},"Issue"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","hooks","feature"],mdxType:"Question"},"#kratos #hooks #feature",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": Are there plans to provide hooks on registration/login/logouts/identity updates?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": Yes! See these issues for more information on the current progress:"," ",Object(a.b)("a",{href:"https://github.com/ory/kratos/issues/271"},"Feature Request: Webhooks")," ","and"," ",Object(a.b)("a",{href:"https://github.com/ory/kratos/issues/30"},"Implement RPC After Hook"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","registration","traits"],mdxType:"Question"},"#kratos #registration #traits",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": How can I verify beforehand if a username is available during registration?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": You can not right now. It would allow account enumeration attacks. See also the"," ",Object(a.b)("a",{href:"https://www.ory.sh/kratos/docs/concepts/security/#account-enumeration"},"section in the documentation"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","database","migration","feature"],mdxType:"Question"},"#kratos #database #migration #feature",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": Do have plans to support user migration scenarios similar to auth0 automatic migrations? E.g. configure a callback to the legacy system when you cannot find the corresponding user, and store the identity on successful legacy system response."),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": No plans yet, but migration is an important piece of the puzzle. We will focus on importing existing users first. An alternative to callback and custom code is fronting the legacy system with Ory Hydra (OAuth2/OIDC Server) and then using that as an upstream in Ory Kratos.")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","security"],mdxType:"Question"},"#kratos #security",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": Do you have protection or plans for brute force attacks i.e. repetitive login attempts? Leaked database scans?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": See the following document:"," ",Object(a.b)("a",{href:"https://www.ory.sh/kratos/docs/concepts/security#passwords"},"Ory Kratos Security Measures"))),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","oidc","traits"],mdxType:"Question"},"#kratos #oidc #traits",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": How do I append a random suffix e.g. a number to OIDC usernames if the username returned by a provider is already taken."),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": You can use the md5 function built in the"," ",Object(a.b)("a",{href:"https://jsonnet.org/ref/stdlib.html"},"jsonnet standart library"),". See the following issue as well:"," ",Object(a.b)("a",{href:"https://github.com/ory/kratos/issues/988"},"Add random function to the jsonnet library"),".")),Object(a.b)("br",null),Object(a.b)(s.b,{tags:["kratos","spa"],mdxType:"Question"},"#kratos #spa",Object(a.b)("p",null,Object(a.b)("strong",null,"Q"),": I want to implement a single-page-app (SPA). Is this possible with Ory Kratos?"),Object(a.b)("p",null,Object(a.b)("strong",null,"A"),": Yes, definitely. We do not have an example-app (yet). Also, you might not get around some page-reloads as you definitely should, as it is not possible to use the API flows in the browser. This is important to prevent"," ",Object(a.b)("a",{href:"https://en.wikipedia.org/wiki/Cross-site_request_forgery"},"CSRF attacks"),". So hopefully you are not too strict with your SPA. A sample app is being worked on here:"," ",Object(a.b)("a",{href:"https://github.com/ory/kratos/issues/668"},"Implement React SPA sample app"),".")),Object(a.b)("br",null))}b.isMDXComponent=!0},553:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g}));var r=n(0),o=n.n(r);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=o.a.createContext({}),u=function(e){var t=o.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},b=function(e){var t=u(e.components);return o.a.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),b=u(n),d=r,g=b["".concat(s,".").concat(d)]||b[d]||p[d]||a;return n?o.a.createElement(g,i(i({ref:t},c),{},{components:n})):o.a.createElement(g,i({ref:t},c))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,s=new Array(a);s[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:r,s[1]=i;for(var c=2;c<a;c++)s[c]=n[c];return o.a.createElement.apply(null,s)}return o.a.createElement.apply(null,n)}d.displayName="MDXCreateElement"},570:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var s=o.apply(null,r);s&&e.push(s)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},719:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b}));var r=n(0),o=n.n(r),a=n(570),s=n.n(a),i=n(62),l=n.n(i),c=n(63),u=n.n(c),b=function(e){var t=e.children,n=e.tags;return o.a.createElement("div",{className:s.a.apply(void 0,[u.a.question].concat(n.map((function(e){return u.a[e]}))))},t)},p=function(e){var t,n,r=e.tag,a=e.isSelected,i=e.children,c=e.toggleSelected;return o.a.createElement("li",{className:s()((t={},t[u.a.selected]=a,t),u.a[r],l.a.pills,l.a.pills__item,(n={},n[l.a["pills__item--active"]]=a,n)),onClick:c},i)},d=function(e){var t=e.tags,n=e.initiallyDisabled,a=Object(r.useState)(t.filter((function(e){return!n.includes(e)}))),s=a[0],i=a[1];return o.a.createElement(o.a.Fragment,null,t.map((function(e){return o.a.createElement(p,{key:e,tag:e,isSelected:s.find((function(t){return t===e})),toggleSelected:function(){s.find((function(t){return t===e}))?i(s.filter((function(t){return t!==e}))):i([].concat(s,[e]))}},"#",e)})))}}}]);