hapijs / hapijs/yar

Password rotation

Open
#163 0 comments 0 reactions 0 assignees View on GitHub
support
Dominant language
JavaScript
Stars
132
Forks
59
PR merge metrics
No merged PRs in 30d

Description

#### Support plan
* *is this issue currently blocking your project?*: no
* *is this issue affecting a production system?*: no

#### Context
* *node version*: v18.2.0
* *module version*: 11.0.0
* *environment* (e.g. node, browser, native): node, browser
* *used with* (e.g. hapi application, another framework, standalone, ...): hapi app
* *any other relevant information*: no

#### How can we help?
In the documentation you write: _"Consider rotating your cookie session password on a regular basis"_ but you fail to explain how to do this.
Is straightforward if we restart the server every time we want to rotate the session password:

```js
import yar from '@hapi/yar'
const server = new hapi.Server({ port })
const yarPlugin = {
plugin: yar,
options: {
name: 'yarCookie',
cookieOptions: {
password: randomPassword(),
}
}
}
await server.register(yarPlugin)
```

How can we do this without restarting the server?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.