openwrt / openwrt/packages

ddns-scripts-gandi: needs updating / duplicating to work with a bearer token instead of an API key

Open
#24,194 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

release/22.03 stale
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @feckert
Environment:
Model | Linksys MR8300 (Dallas)
Architecture | ARMv7 Processor rev 5 (v7l)
Target Platform | ipq40xx/generic
Firmware Version | OpenWrt 22.03.3 r20028-43d71ad93e / LuCI openwrt-22.03 branch git-24.067.02332-4c1ddfb
Kernel Version | 5.10.161

Gandi have deprecated API keys in favour of Personal Access Tokens (PAT) which are basically bearer tokens which can be scoped to single domains and given restricted permisisons and force a rotation once per year.

From a fairly cursory glance at the repository I think there are basically 3 ways of supporting this:

  1. Duplicate the plugin, append -uat to the name & swap the Apikey header for Bearer
  2. Change line 24 of https://github.com/openwrt/packages/blob/openwrt-22.03/net/ddns-scripts/files/usr/lib/ddns/update_gandi_net.sh#L24 which seems like an unnecessary breaking change given you can still generate API keys.
  3. Set / pass an option from the ddns wrapper to the update script. (I couldn't see any obvious way to do this).

I've checked that switching the header works & I'm happy to prep a PR for option 1 if the project maintainers agree that's a useful thing to do. Thank you for all your work on OpenWRT.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with net/ddns-scripts/files/usr/lib/ddns/update_gandi_net.sh, especially line 24, and review the three proposed approaches for passing Gandi credentials. Confirm with maintainers which approach is wanted before changing anything. Done means Gandi Personal Access Tokens work with bearer authentication while the existing API-key path is considered appropriately. No test file or run command is named.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.