Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finish-block #6

Open
wants to merge 91 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
ee2070e
feat: removed agama-inbound dependency
Milton-Ch Apr 4, 2024
879ecd6
feat: update project.json
Milton-Ch Apr 4, 2024
06029bf
feat: update org.gluu.agama.securitykey.main.json
Milton-Ch Apr 4, 2024
e55c10d
feat: update org.gluu.agama.securitykey.main.flow
Milton-Ch Apr 4, 2024
8936be2
feat: update project.json
Milton-Ch Apr 4, 2024
f2b8eba
feat: update org.gluu.agama.securitykey.main.json
Milton-Ch Apr 4, 2024
fbcd620
feat: update org.gluu.agama.securitykey.main.flow
Milton-Ch Apr 4, 2024
1e71b7c
feat: update project.json
Milton-Ch Apr 4, 2024
1fe3a60
feat: update org.gluu.agama.securitykey.main.json
Milton-Ch Apr 4, 2024
b3b2066
feat: update org.gluu.agama.securitykey.main.flow
Milton-Ch Apr 4, 2024
b85cd6a
feat: update project.json
Milton-Ch Apr 4, 2024
64492ff
feat: update org.gluu.agama.securitykey.main.json
Milton-Ch Apr 4, 2024
4b01f85
feat: update org.gluu.agama.securitykey.main.flow
Milton-Ch Apr 4, 2024
cef272c
feat: update project.json
Milton-Ch Apr 5, 2024
abde8f7
feat: update org.gluu.agama.securitykey.main.json
Milton-Ch Apr 5, 2024
8a459e2
feat: update org.gluu.agama.securitykey.main.flow
Milton-Ch Apr 5, 2024
34a5878
feat: update project.json
Milton-Ch Apr 5, 2024
2154cfa
feat: update org.gluu.agama.securitykey.fidoAuthn.json
Milton-Ch Apr 5, 2024
8896ab7
feat: update org.gluu.agama.securitykey.fidoAuthn.flow
Milton-Ch Apr 5, 2024
d42608f
feat: update project.json
Milton-Ch Apr 5, 2024
34daa5d
feat: update org.gluu.agama.securitykey.fidoAuthn.json
Milton-Ch Apr 5, 2024
5cf44bb
feat: update org.gluu.agama.securitykey.fidoAuthn.flow
Milton-Ch Apr 5, 2024
2e78914
feat: update project.json
Milton-Ch Apr 5, 2024
bbba525
feat: update org.gluu.agama.securitykey.fidoAuthn.json
Milton-Ch Apr 5, 2024
62139c3
feat: update org.gluu.agama.securitykey.fidoAuthn.flow
Milton-Ch Apr 5, 2024
490d3db
feat: update README.md
Milton-Ch Apr 5, 2024
1be097e
feat: update main.ftlh
madhu1310 Apr 26, 2024
0c56c2f
feat: update main.ftlh
madhu1310 Apr 26, 2024
31a571f
feat: update fido-authn.ftlh
madhu1310 Apr 26, 2024
8a084ff
feat: update main.ftlh
madhu1310 Apr 30, 2024
3e251e7
feat: update fido-authn.ftlh
madhu1310 Apr 30, 2024
18e5429
feat: update fido-authn.ftlh
madhu1310 Apr 30, 2024
0ebb0f6
feat: update project.json
madhu1310 Apr 30, 2024
9093cec
feat: update org.gluu.agama.securitykey.main.json
madhu1310 Apr 30, 2024
ee187ee
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 Apr 30, 2024
c6d3fb5
feat: update project.json
madhu1310 May 1, 2024
3842336
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
2a9c7cd
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
23a876a
feat: update project.json
madhu1310 May 1, 2024
e595f7c
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
4b6f6ef
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
3bc6c26
feat: update project.json
madhu1310 May 1, 2024
7043adb
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
15867ba
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
f93db7c
feat: update project.json
madhu1310 May 1, 2024
9ca91d0
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
4ca4577
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
775ae0b
feat: update project.json
madhu1310 May 1, 2024
4f9a4f8
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
1398a2c
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
485bc92
feat: update project.json
madhu1310 May 1, 2024
be95c76
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
e31868e
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
e04e579
feat: update project.json
madhu1310 May 1, 2024
9fa6b33
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
112d2f6
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
6f33233
feat: update project.json
madhu1310 May 1, 2024
d52a168
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
2b1f9e5
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
a6435ef
feat: update project.json
madhu1310 May 1, 2024
cde8463
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
d8bb026
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
4fd47fb
feat: update project.json
madhu1310 May 1, 2024
65abeeb
feat: update project.json
madhu1310 May 1, 2024
2081b2f
feat: update project.json
madhu1310 May 1, 2024
11de9a6
feat: update project.json
madhu1310 May 1, 2024
d97c551
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
cbc0a64
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
a3298e1
feat: update project.json
madhu1310 May 1, 2024
549c284
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
0f1a026
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
4c6c22c
feat: update project.json
madhu1310 May 1, 2024
2c016b9
feat: update project.json
madhu1310 May 1, 2024
b06c9fc
feat: update project.json
madhu1310 May 1, 2024
6d67561
feat: update project.json
madhu1310 May 1, 2024
8e5a19e
feat: update project.json
madhu1310 May 1, 2024
1cef4be
feat: update project.json
madhu1310 May 1, 2024
9a3a5ae
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
d03e8fb
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
217e5ae
feat: update project.json
madhu1310 May 1, 2024
d777789
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
a9dd56e
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
304e677
feat: update project.json
madhu1310 May 1, 2024
00177a2
feat: update project.json
madhu1310 May 1, 2024
60065ef
feat: update project.json
madhu1310 May 1, 2024
6fabfcd
feat: update org.gluu.agama.securitykey.main.json
madhu1310 May 1, 2024
9ee6a9d
feat: update org.gluu.agama.securitykey.main.flow
madhu1310 May 1, 2024
09ae5df
feat: update main.ftlh
madhu1310 May 7, 2024
12c2baf
feat: update fido-authn.ftlh
madhu1310 May 7, 2024
01b7509
feat: update project.json
madhu1310 May 7, 2024
c55e0cc
Merge branch 'agama-lab-branch' into agama-lab-branch
madhu1310 May 7, 2024
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
104 changes: 30 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,40 @@
# Agama Security Key Project

<!-- These are statistics for this repository-->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![Apache License][license-shield]][license-url]

Use this project to authenticate using security devices (Yubico Key, Windows Hello, Touch ID on Mac, etc.)

## How it works at a glance

When a main flow of this project is launched (namely `io.jans.agama.securitykey.main`) the user's browser is redirected
to a view where he/she must first enter his/her username, then validate one of the security keys that he/she has
configured for his/her user (Yubico Key, Windows Hello, Touch ID on Mac, etc.). Finally, the user's browser is
redirected to the registered URI.

> **Note:** You must have registered security devices to your user, to register you must use **Jans Casa**.

## Project Deployment

To deploy this project we need to meet the requirements.

### Requirements

1. Running instance of `Jans Auth Server`, `Jans Fido2` and `Jans Casa`

### Add Java dependencies

1. Download
latest [agama-securitykey-custom.jar](https://github.com/GluuFederation/agama-security-key/releases/latest/download/agama-securitykey-custom.jar)
from [Releases](https://github.com/GluuFederation/agama-securitykey/releases)
2. `scp` the jar file to `/opt/jans/jetty/jans-auth/custom/libs/` on Auth Server
3. On Auth Server, edit `/opt/jans/jetty/jans-auth/webapps/jans-auth.xml` and
add the jar file to the `<set name="extractClasspath">...</Set>` element. For example:
# Agama Security Key

```
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/jans-auth</Set>
<Set name="war">
<Property name="jetty.webapps" default="." />/jans-auth.war
</Set>
<Set name="extractWAR">true</Set>
<Set name="extraClasspath">
...
/opt/jans/jetty/jans-auth/custom/libs/agama-securitykey-custom.jar,
...
</Set>
</Configure>
```
Welcome to the https://github.com/GluuFederation/agama-securitykey project. This project is governed by Gluu and published under an Apache 2.0 license.

4. Restart Auth Server to load the new jar:
Use this project to add user authentication with **SecurityKey**(Yubico Key, Windows Hello, Touch ID on Mac, etc.)

```
systemctl restart jans-auth
````
For more information you can also see
* [What is FIDO](https://fidoalliance.org/what-is-fido/)
* [How FIDO Works](https://fidoalliance.org/how-fido-works/)
* [FIDO Specs](https://www.w3.org/TR/webauthn-1)

### Deployment
## Supported IDPs

Download the
latest [agama-securitykey.gama](https://github.com/GluuFederation/agama-securitykey/releases/latest/download/agama-securitykey.gama)
file and deploy it in Auth Sever.
| IDP | Description |
|:-----------------|:-------------------------------------------------------------------|
| Jans Auth Server | [Deployment instructions](https://docs.jans.io/head/admin/install) |
| Gluu Flex | [Deployment instructions](https://docs.gluu.org/head/install) |

Siga los siguientes pasos:
## Flows

- Copy (SCP/SFTP) the gama file of this project to a location in your `Jans Server`
- Connect (SSH) to your `Jans Server` and open TUI: `python3 /opt/jans/jans-cli/jans_cli_tui.py`
- Navigate to the `Agama` tab and then select `"Upload project"`. Choose the gama file
- Wait for about one minute and then select the row in the table corresponding to this project
- Press `d` and ensure there were not deployment errors
- Pres `ESC` to close the dialog
| Qualified Name | Description |
|----------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `org.gluu.agama.securitykey.main` | This is the main flow that you can start directly from the browser. To use this first flow, make sure you have at least one `security key` configured, this can be done from **JANS CASA**. In this first view you will only be asked for your username and then you will be redirected to the `org.gluu.agama.passkey.fidoAuthn` flow where the validation of your security key device will be done. |
| `org.gluu.agama.securitykey.fidoAuthn` | This flow is used to perform the `security key` validation, you have the option to cancel the process. If you complete the flow successfully, you will be granted access. |

![TUI_DEPLOY](https://github.com/GluuFederation/agama-securitykey/assets/86965029/de25752e-3c86-4c67-a890-2e78494e4c6c)
## Configuration

## Testing
This agama project does not need any additional configuration to run its flow.

You'll need an OpenID Connect test RP. You can try [oidcdebugger](https://oidcdebugger.com/),
[jans-tarp](https://github.com/JanssenProject/jans/tree/main/demos/jans-tarp)
or [jans-tent](https://github.com/JanssenProject/jans/tree/main/demos/jans-tent). Check out this video to see an example
of **agama-securitykey** in action:
## Demo

![TEST_AGAMA_SECURITY_KEY](https://github.com/GluuFederation/agama-securitykey/assets/86965029/53baa0ab-d2d0-4e5f-a3c1-7c15c2dc48be)

Expand All @@ -98,26 +54,26 @@ of **agama-securitykey** in action:

# License

This project is licensed under the [Apache 2.0](https://github.com/GluuFederation/agama-security-key/blob/main/LICENSE)
This project is licensed under the [Apache 2.0](https://github.com/GluuFederation/agama-securitykey/blob/main/LICENSE)

<!-- This are stats url reference for this repository -->

[contributors-shield]: https://img.shields.io/github/contributors/GluuFederation/agama-security-key.svg?style=for-the-badge
[contributors-shield]: https://img.shields.io/github/contributors/GluuFederation/agama-securitykey.svg?style=for-the-badge

[contributors-url]: https://github.com/GluuFederation/agama-security-key/graphs/contributors
[contributors-url]: https://github.com/GluuFederation/agama-securitykey/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/GluuFederation/agama-security-key.svg?style=for-the-badge
[forks-shield]: https://img.shields.io/github/forks/GluuFederation/agama-securitykey.svg?style=for-the-badge

[forks-url]: https://github.com/GluuFederation/agama-security-key/network/members

[stars-shield]: https://img.shields.io/github/stars/GluuFederation/agama-security-key?style=for-the-badge
[stars-shield]: https://img.shields.io/github/stars/GluuFederation/agama-securitykey?style=for-the-badge

[stars-url]: https://github.com/GluuFederation/agama-security-key/stargazers
[stars-url]: https://github.com/GluuFederation/agama-securitykey/stargazers

[issues-shield]: https://img.shields.io/github/issues/GluuFederation/agama-security-key.svg?style=for-the-badge
[issues-shield]: https://img.shields.io/github/issues/GluuFederation/agama-securitykey.svg?style=for-the-badge

[issues-url]: https://github.com/GluuFederation/agama-security-key/issues
[issues-url]: https://github.com/GluuFederation/agama-securitykey/issues

[license-shield]: https://img.shields.io/github/license/GluuFederation/agama-security-key.svg?style=for-the-badge
[license-shield]: https://img.shields.io/github/license/GluuFederation/agama-securitykey.svg?style=for-the-badge

[license-url]: https://github.com/GluuFederation/agama-security-key/blob/master/LICENSE
[license-url]: https://github.com/GluuFederation/agama-securitykey/blob/master/LICENSE
16 changes: 13 additions & 3 deletions code/org.gluu.agama.securitykey.fidoAuthn.flow
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
// This flow is responsible for validation with the security key device
Flow org.gluu.agama.securitykey.fidoAuthn
Basepath ""
Inputs userData withEscape
// Mark startup logs
Log "@debug Fido Authn flow started!"
jose = Call org.gluu.agama.securitykey.authn.FidoValidator#new
// Get instance FidoValidator
jose = Call org.gluu.agama.securitykey.authn.FidoValidator#new
// Generates the assertionRequest record to initiate validation
assertion = Call jose assertionRequest userData.uid
// "obj" variable declaration to be sent to validation view
obj = { name: userData.name, escape: withEscape, assertion: assertion }
// Load fido-authn page and pass "obj"
obj = RRF "fido-authn.ftlh" obj
When obj.skipped is ""
Finish false
it_obhbo = {success:false, error: "false"}
Finish it_obhbo
// Performs the verification after processing the security device
obj = Call jose verify obj.tokenResponse
Finish true
// Ends the flow correctly
it_mdehp = {success:false, error: "true"}
Finish it_mdehp
Loading