canonical / canonical/authd

Feature: Support forcing local password changes based on time constraints

Open
#926 9 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
308
Forks
41
Avg merge
2d 4h
Merged PRs (30d)
58

Description

### Is there an existing request for this feature?

- [x] I have searched the existing issues and found none that matched mine

### Describe the feature

In some environments the local password may be required to be changed regularly and currently we don't have a way to make system administrators to enforce that.

`login` may obey to `login.defs` values, but given that the authd module may override other modules behaviors and that nothing else knows when authd local password has been changed, it's the duty of the authd _brokers_ to check it.

We have also no way to know, at authd level, if a broker requires one or multiple password mechanisms, so we can't just rely on saving the local password in the PAM stack and use other modules to check this.

### Describe the ideal solution

Add broker settings to replicate what `login` does via:

```conf
#
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
```

So, that we initially use a skippable password change request (as we already do in the example broker), and eventually we require the user to change the password.

This may require saving the user last-password change information in the DB too.

### Alternatives and current workarounds

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the example broker and the login/login.defs password-aging behavior described in the issue. Trace how authd brokers handle password-change requests and how user state is stored in the DB. Done means broker settings cover the stated aging controls, support initially skippable and eventually required changes, and preserve the last-password-change information as needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.