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

Issue Report - FreeOTP Unknown Issuer in Issuer Field #7126

Closed
Gaitonde007 opened this issue Jan 8, 2024 · 13 comments
Closed

Issue Report - FreeOTP Unknown Issuer in Issuer Field #7126

Gaitonde007 opened this issue Jan 8, 2024 · 13 comments
Assignees
Labels
feature Adding new functionality

Comments

@Gaitonde007
Copy link

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

I have encountered an issue with FreeOTP on OPNsense where the issuer field displays as "unknown." This occurs when attempting to use FreeOTP for two-factor authentication within the OPNsense environment.

To Reproduce

Steps to reproduce the behaviour:

  1. Install FreeOTP on a device.
  2. Set up two-factor authentication in OPNsense using FreeOTP.
  3. Generate a token and observe the issuer field.

Expected behaviour

I expected the issuer field in FreeOTP on OPNsense to display the correct and expected issuer information. Unfortunately i don't see an option to set the issuer field.

Screenshots

1b60104c-4254-4f42-ad0f-614876abda95

Additional context
I do not get this error on Google Authenticator, it displays the hostname given to the OPNsense correctly.
Kindly provide steps to resolve this issue.

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 24.1 (amd64).

@AdSchellevis AdSchellevis added the support Community support label Jan 8, 2024
@AdSchellevis
Copy link
Member

probably better ask them what they need to display an issuer... you can find their GitHub repo's at https://github.com/freeotp

@Gaitonde007
Copy link
Author

probably better ask them what they need to display an issuer... you can find their GitHub repo's at https://github.com/freeotp

Hi, sure will do.
FYI: with pfSense it displays as FreeRadius Server since external authentication is built into that package.

Thanks.

@AdSchellevis
Copy link
Member

if they add OPNsense, I don't mind adding an issuer on our end:

https://github.com/pfsense/FreeBSD-ports/blob/9fdee68a7df90cab70451ac684e2a8b21d824b08/net/pfSense-pkg-freeradius3/files/usr/local/pkg/freeradius.xml#L330

$otp_url .= $pconfig['usernamefld']."@".htmlspecialchars($config['system']['hostname'])."?secret=";

@joggee-fr
Copy link

Hi @AdSchellevis,
I get here following freeotp/freeotp-android#387 and analyze URI returned by OPNsense in this comment freeotp/freeotp-android#387 (comment).
Just to know, did you except $config['system']['hostname'] to be viewed as the issuer here?

@AdSchellevis
Copy link
Member

@joggee-fr yes, usually it shows user@domain in these type of apps.

@joggee-fr
Copy link

@AdSchellevis
As I understand the docs on OTP URI format, in the case otpauth://totp/User1@Mail_VPN?secret=, User1@Mail_VPN is the account name. FreeOTP seems to choose to display the issuer but none is precised here.
OPNsense:User1@Mail_VPN would certainly display OPNsense as issuer for example. Or it seems it can also be added as URI parameters OPNsense:User1@Mail_VPN?secret=&issuer=OPNsense.

@AdSchellevis
Copy link
Member

I don't mind adding an issuer, but I don't expect them to have a logo on their end....

@joggee-fr
Copy link

If I am right, FreeOTP will display a custom logo if:

  1. A logo for the issuer has been defined in the app (hard-coded stuff). If you had the issuer, someone may propose a PR to add an associated image in FreeOTP ;
  2. Or you had image to the URI parameters e.g. discussed here.

@AdSchellevis
Copy link
Member

@joggee-fr can you try 12001a3 ? install via:

opnsense-patch 12001a3

@AdSchellevis AdSchellevis self-assigned this Feb 6, 2024
@AdSchellevis AdSchellevis added feature Adding new functionality and removed support Community support labels Feb 6, 2024
@joggee-fr
Copy link

@Gaitonde007, as you are the initial reporter could you give this patch a test?

@Gaitonde007
Copy link
Author

@Gaitonde007, as you are the initial reporter could you give this patch a test?

Hi @joggee-fr , I have tested on Android and it works as expected. Issue on IOS still persists.

Thanks

@joggee-fr
Copy link

@Gaitonde007, I am not aware of the iOS version of the FreeOTP application. However, did you open an issue there?

@Gaitonde007
Copy link
Author

@Gaitonde007, I am not aware of the iOS version of the FreeOTP application. However, did you open an issue there?

Sorry for my ignorance, I will report it there. I believe they have to do something similar which was done with Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

3 participants