# acme-dns-01-ali-secretify

> AliDNS challenger for ACME.js and Greenlock.js, **keeping accessKeyId/Secret security.**

Latest version **0.1.4** (published 2021-09-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install acme-dns-01-ali-secretify
pnpm add acme-dns-01-ali-secretify
yarn add acme-dns-01-ali-secretify
bun add acme-dns-01-ali-secretify
```

Provides the command `makeSecret`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2021-09-08 |
| First published | 2021-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | eisen.yang@gmail.com |
| Maintainers | eisenyang |
| Keywords | greenlock, acme, challenge, ali, aliDNS, encrypt, secret |

## Links

- npm: https://www.npmjs.com/package/acme-dns-01-ali-secretify
- Repository: https://github.com/eisenyang/acme-dns-01-ali-secretify
- Homepage: https://github.com/eisenyang/acme-dns-01-ali-secretify#readme
- Issues: https://github.com/eisenyang/acme-dns-01-ali-secretify/issues
- npm.io page: https://npm.io/package/acme-dns-01-ali-secretify

## Dependencies (4)

- [dotenv](https://npm.io/package/dotenv.md) ^10.0.0
- [secretify](https://npm.io/package/secretify.md) ^0.1.1
- [readline-sync](https://npm.io/package/readline-sync.md) ^1.4.10
- [@alicloud/pop-core](https://npm.io/package/@alicloud/pop-core.md) ^1.7.10

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 0.1.4 (latest) — 2021-09-08
- 0.1.3 — 2021-09-08
- 0.1.2 — 2021-09-08
- 0.1.1 — 2021-09-08
- 0.1.0 — 2021-09-08

## README

# acme-dns-01-ali-secretify

AliDNS challenger for ACME.js and Greenlock.js, **keeping accessKeyId/Secret security.**

## Why
Greenlock.js save challenger's config in plain json by default.

This for keeping the AliDNS's accessKeyId/Secret secure. 

## Install

```bash
npm install --save acme-dns-01-ali-secretify
```

Generate AliCloud secretString:

1. [Get accessKeyId && accessKeySecret](https://help.aliyun.com/knowledge_detail/38738.html)
2. Set "SECRETIFY_KEY=VeryStrongPassword" in your env.
3. Run `npx makeSecret` then copy the `secretString` for future use.

## Usage
You can use it with any compatible ACME library,
such as Greenlock.js or ACME.js.

### Greenlock.js

```js
var Greenlock = require('greenlock');

var greenlock = Greenlock.create();
greenlock.manager.defaults({
  subscriberEmail: email,
  agreeToTerms: false,
  challenges: {
    'dns-01': {
      module: 'acme-dns-01-ali-secretify',
      secret: 'your secretString'
    },
  },
});
```

See [Greenlock.js](https://git.rootprojects.org/root/greenlock.js) documentation for more details.

See the [ACME.js](https://git.rootprojects.org/root/acme-v2.js) for more details.

### Build your own

There are only 5 methods:

- `init(config)`
- `zones(opts)`
- `set(opts)`
- `get(opts)`
- `remove(opts)`

```js
dns01
  .set({
    identifier: { value: 'foo.example.co.uk' },
    wildcard: false,
    dnsZone: 'example.co.uk',
    dnsPrefix: '_acme-challenge.foo',
    dnsAuthorization: 'xxx_secret_xxx'
  })
  .then(function() {
    console.log('TXT record set');
  })
  .catch(function() {
    console.log('Failed to set TXT record');
  });
```

See [acme-dns-01-test](https://git.rootprojects.org/root/acme-dns-01-test.js)
for more implementation details.

## Tests
Create `.env` file in project root directory:

```dotnetcli
ZONE='xxx'
SECRET='xxx'
SECRETIFY_KEY='VeryStrongPassword'
```

```bash
node test/test.cjs
```

---
_Source: https://npm.io/package/acme-dns-01-ali-secretify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
