Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Build DCHP specification

on:
push:
paths:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure, but i do believe this would currently trigger twice for pushes to PRs - I believe we only want push to trigger on main?

Suggested change
paths:
branches: [main]
paths:

- 'draft/**'
- 'tools/**'
- 'Makefile'
- '.github/workflows/build.yml'
pull_request:
paths:
- 'draft/**'
- 'tools/**'
- 'Makefile'
- '.github/workflows/build.yml'
workflow_dispatch:

permissions:
contents: read

env:
DOC: digital-credentials-harmonized-presentation

jobs:
build:
name: Build HTML Editor's Copy and ISO Word document
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# HTML Editor's Copy (markdown2rfc / mmark), same tooling as other OpenID
# DCP specifications; published to GitHub Pages below.
- name: Render HTML Editor's Copy
run: make html

# Pin the interpreter: the mmark->pandoc converter needs tomllib (3.11+).
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Run tests
run: make test

# ISO-styled Word document (pandoc), for sharing the draft with ISO.
# Delivered as a workflow artifact only; not published to the site.
# Pinned .deb release so the .docx rendering is reproducible (and faster
# than `apt-get update && install`, which pulls whatever the runner has).
- name: Install pandoc
env:
PANDOC_VERSION: '3.8.3'
run: |
curl -fsSL -o /tmp/pandoc.deb \
"https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb"
sudo dpkg -i /tmp/pandoc.deb

- name: Render ISO Word document
run: make docx

- name: Assemble HTML for GitHub Pages
run: |
mkdir -p _site
cp build/*.html _site/
# Redirect the bare Pages URL to the Editor's Copy (avoids a root 404).
printf '<!doctype html>\n<meta http-equiv="refresh" content="0; url=%s-editors-copy.html">\n' \
"${{ env.DOC }}" > _site/index.html

- name: Upload site artifact
uses: actions/upload-artifact@v4
with:
name: site
path: _site

- name: Upload ISO Word document artifact
uses: actions/upload-artifact@v4
with:
name: iso-word-document
path: build/${{ env.DOC }}.docx

publish-to-pages:
name: Publish Editor's Copy to GitHub Pages
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
# Serialise Pages deployments so two quick merges to main can't race (one
# failing with "a deployment is already in progress", or publishing stale).
concurrency:
group: "pages"
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download site artifact
uses: actions/download-artifact@v4
with:
name: site
path: _site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
*.redxml
*.upload
/*-[0-9][0-9].xml
/draft/*.xml
/.refcache
/versioned/
archive.json
report.xml

# Build outputs — HTML draft, ISO Word document and all intermediates.
# Source scripts live in tools/; the ISO template lives in tools/template/.
/build/

# Build tooling
/.gems/
/.targets.mk
Expand All @@ -20,6 +25,10 @@ Gemfile.lock
package-lock.json
/lib/

# Python bytecode caches (tools/ and tools/tests/)
__pycache__/
*.py[cod]

# Editor / OS files
*~
*.swp
Expand Down
81 changes: 81 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Build the DCHP specification.
#
# make html - render the HTML Editor's Copy with markdown2rfc (Docker)
# make docx - render the ISO-styled Word document with pandoc
# make all - build both
# make test - run the test suite
# make clean - remove the build/ directory
#
# Source scripts live in tools/; everything generated goes to build/ (which is
# git-ignored). `make html` needs Docker; `make docx` needs pandoc and a Python
# with tomllib (3.11+, for the converter).

SRCDIR := draft
DOC := digital-credentials-harmonized-presentation
SRC := $(SRCDIR)/$(DOC).md

TOOLS := tools
BUILD := build

# The mmark->pandoc converter needs tomllib (Python 3.11+). Auto-pick the first
# available interpreter that has it, so `make docx` works even where the default
# python3 is older; override explicitly with `make docx PYTHON=/path/to/python`.
PYTHON ?= $(shell for p in python3 python3.13 python3.12 python3.11; do \
command -v $$p >/dev/null 2>&1 && $$p -c 'import tomllib' >/dev/null 2>&1 \
&& { echo $$p; exit 0; }; \
done)

# Pinned by digest so the HTML rendering is reproducible: an untagged/:latest
# image could silently change the output between identical commits. Regenerate
# the digest with `docker inspect --format '{{index .RepoDigests 0}}' <image>`.
MD2RFC_IMAGE := danielfett/markdown2rfc@sha256:7b4412559d6ba5db45a14174a28da5b240512e7c2a886a5e4adb44e5e67f34ca

# Reference document with the ISO styles/layout, committed to the repo (derived
# once from the ISO template by tools/make-iso-reference.py; not regenerated per
# build). The ISO template itself is not committed — see that script's docstring.
REFDOC := $(TOOLS)/template/iso-reference.docx

HTML_OUT := $(BUILD)/$(DOC)-editors-copy.html

.PHONY: all html docx test clean need-python

all: html docx

# The converter and the tests need $(PYTHON); fail with guidance if none found.
need-python:
@test -n "$(strip $(PYTHON))" || { \
echo "error: no Python with tomllib (3.11+) found;"; \
echo " install one or run: make <target> PYTHON=/path/to/python3.11+"; \
exit 1; }

## HTML Editor's Copy (markdown2rfc / mmark) -> build/
html: $(SRC)
# Clean stale intermediates first so the copy below is unambiguous even if a
# previous run was interrupted.
rm -f $(SRCDIR)/$(DOC)*.html $(SRCDIR)/$(DOC)*.xml $(SRCDIR)/$(DOC)*.txt
docker run --rm -v "$(CURDIR)/$(SRCDIR):/data" $(MD2RFC_IMAGE) $(DOC).md
mkdir -p $(BUILD)
# Cleaned above, so this glob now matches exactly the fresh output whatever
# markdown2rfc names it (it may add a draft-version suffix).
cp $(SRCDIR)/$(DOC)*.html $(HTML_OUT)
rm -f $(SRCDIR)/$(DOC)*.html $(SRCDIR)/$(DOC)*.xml $(SRCDIR)/$(DOC)*.txt
@echo "HTML Editor's Copy -> $(HTML_OUT)"

## ISO-styled Word document (pandoc) -> build/
docx: need-python $(SRC) $(REFDOC) $(TOOLS)/mmark-to-pandoc.py $(TOOLS)/iso-styles.lua
mkdir -p $(BUILD)
$(PYTHON) $(TOOLS)/mmark-to-pandoc.py < $(SRC) > $(BUILD)/$(DOC).pandoc.md
pandoc $(BUILD)/$(DOC).pandoc.md \
--reference-doc=$(REFDOC) \
--lua-filter=$(TOOLS)/iso-styles.lua \
-o $(BUILD)/$(DOC).docx
rm -f $(BUILD)/$(DOC).pandoc.md
@echo "ISO Word document -> $(BUILD)/$(DOC).docx"

## Test suite (every tools/tests/test_*.py, so new tests run without editing this)
test: need-python
@for t in $(TOOLS)/tests/test_*.py; do $(PYTHON) $$t || exit 1; done

clean:
rm -rf $(BUILD)
rm -f $(SRCDIR)/$(DOC)*.html $(SRCDIR)/$(DOC)*.xml $(SRCDIR)/$(DOC)*.txt
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ for more information.

## Specifications

The working group is at an early stage and no drafts have been published yet.
Links to the Editor's Copy and Working Group Drafts will be added here as they
become available.
The Editor's Copy is built automatically from [draft/](draft/) on every change
to the `main` branch. It reflects the latest in-progress edits and is not an
approved Working Group Draft:

- [Digital Credentials Harmonized Presentation — Editor's Copy](https://openid.github.io/dchp/digital-credentials-harmonized-presentation-editors-copy.html)

## Contributing

Expand Down
120 changes: 120 additions & 0 deletions draft/digital-credentials-harmonized-presentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
%%%
title = "Digital Credentials Harmonized Presentation - Editor's Copy"
abbrev = "dchp"
ipr = "none"
workgroup = "Digital Credentials Harmonized Presentation"
keyword = ["digital credentials", "mdoc", "sd-jwt vc", "presentation", "iso"]

# NOTE: this [seriesInfo] block is IETF Internet-Draft scaffolding needed by the
# markdown2rfc (mmark/xml2rfc) HTML toolchain; it is NOT a claim that this is an
# IETF document. mmark 2.2.31 hard-codes <rfc submissionType="IETF"> and does not
# propagate the stream, so a non-IETF stream (e.g. "independent") makes xml2rfc
# fail with a stream/submissionType mismatch. We therefore leave "stream" unset
# rather than assert a false "IETF" stream; mmark only warns ("Empty 'stream'")
# and the HTML still builds. The real publication reference for this OpenID/ISO
# joint document is a WG/SDO decision -- see issue 13.
[seriesInfo]
name = "Internet-Draft"
value = "digital-credentials-harmonized-presentation"
status = "standard"

[[author]]
initials = "TBD"
surname = "Editor"
fullname = "TBD Editor"
organization = "OpenID Foundation"
[author.address]
email = "openid-specs-dchp@lists.openid.net"

%%%

.# Abstract

This document specifies a harmonized protocol for the presentation of digital
credentials, bringing together the credential presentation approaches of
ISO/IEC 18013-5 and OpenID for Verifiable Presentations across multiple
credential formats, including ISO mdoc and IETF SD-JWT VC.

.# Foreword

This specification has been jointly developed by members of ISO/IEC JTC 1/SC 17
WG 10 and members of the OpenID Foundation Digital Credentials Protocols (DCP)
Working Group, under the OpenID Foundation's Digital Credentials Harmonized
Presentation (DCHP) Working Group.

This is an Editor's Copy. It is a work in progress and is subject to change
at any time.

.# Introduction

ISO/IEC 18013-5 (Device Request / Device Response) and OpenID for Verifiable
Presentations (Authorization Request / Authorization Response) take different
approaches to credential presentation. This document defines a harmonized
digital credentials request protocol that brings these together, supporting both
in-person and online presentation and the coexistence of multiple credential
formats, including ISO mdoc and IETF SD-JWT VC.

The objective is to enable interoperability among the parties involved in the
presentation of digital credentials while allowing existing deployments to
continue to operate.

{mainmatter}

# Scope

To be completed.

# Normative references

The following documents are referred to in the text in such a way that some or
all of their content constitutes requirements of this document.

To be completed.

# Terms and definitions

For the purposes of this document, the following terms and definitions apply.

ISO and IEC maintain terminology databases for use in standardization at the
following addresses:

* ISO Online browsing platform: available at <https://www.iso.org/obp>
* IEC Electropedia: available at <https://www.electropedia.org/>

To be completed.

# Symbols and abbreviated terms

To be completed.

# Conventions

In this document, the following verbal forms are used:

* "shall" indicates a requirement;
* "should" indicates a recommendation;
* "may" indicates a permission;
* "can" indicates a possibility or a capability.

These verbal forms are used in accordance with ISO/IEC Directives, Part 2,
Clause 7 (see <https://www.iso.org/directives-and-policies.html>).

{backmatter}

# Bibliography

[1] ISO/IEC Directives, Part 2, *Principles and rules for the structure and
drafting of ISO and IEC documents*

# Acknowledgements {#Acknowledgements}

We would like to thank TBD for their
valuable feedback and contributions to this specification.

# Document History

[[ To be removed from the final specification ]]

-00

* initial working draft
Loading
Loading