<p>I want to activate ambassador authservice to only require authentication on certain routes/urls. Now if you install the basic http auth service it requires this auth for all services by default. So how can I configure ambassador or the auth service (separate service with ExAuth) to only require auth on certain routes/urls?</p>

<p>Ambassador version 0.51.2
kubernetes version 1.14
auth service I am using as base: <a href="https://github.com/datawire/ambassador-auth-httpbasic" rel="nofollow noreferrer">https://github.com/datawire/ambassador-auth-httpbasic</a></p>

cm4l
<p>If you see the <code>server.js</code> example in <a href="https://github.com/datawire/ambassador-auth-httpbasic" rel="nofollow noreferrer">https://github.com/datawire/ambassador-auth-httpbasic</a> you'll see that it's only authenticating for <a href="https://github.com/datawire/ambassador-auth-service/blob/master/server.js#L44" rel="nofollow noreferrer"><code>/extauth/qotm/quote*</code></a>. If you are using the same <code>server.js</code> to start you'll have to add another <code>app.all</code> section with whatever you want to authenticate. For example:</p>

<pre><code>app.all('/extauth/myapp/myurl*', authenticate, function (req, res) {
  var session = req.headers['x-myapp-session']

  if (!session) {
    console.log(`creating x-myapp-session: ${req.id}`)
    session = req.id
    res.set('x-myapp-session', session)
  }

  console.log(`allowing MyApp request, session ${session}`)
  res.send('OK (authenticated)')
})
</code></pre>

<p>Or you can implement this server using a different language if you'd like too.</p>
