# Support ticket questions

**URL:** <https://discourse.openondemand.org/t/support-ticket-questions/2796>\
**Category:** Get Help\
**Tags:** question\
**Created:** [July 5, 2023, 6:56pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796 "2023-07-05T18:56:52Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcuma](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mcuma/32/171_2.png) [@mcuma](https://discourse.openondemand.org/u/mcuma)\
**Post date:** [July 5, 2023, 6:56pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/1 "2023-07-05T18:56:52Z")

</div>

I am looking at the Support Ticket menu item in 3.0, [Customizations — Open OnDemand 3.0.0 documentation](https://osc.github.io/ood-documentation/latest/customizations.html#support-ticket-guide), since I think it’d be useful to provide this option to our users. I have a few questions about that.

First, how is the e-mail being sent? In the documentation, an example of Gmail smtp is provided, but, I would imagine one would need to provide username and password in the config file which is not ideal. In our case, authenticating to OOD (via CAS), the user is also authenticated to our University e-mail, so, I am wondering if we could somehow automatically send that e-mail via this route.

With an initial naive setup in `ondemand.yml` which looks like this:

```auto
support_ticket:
  email:
    to: "helpdesk@chpc.utah.edu"

```

I get an error from OOD after pushing the send button as:

```auto
There was an error processing your request: SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate) 

```

Second, I think it’d be good to auto-fill the user’s e-mail address. We have a erb snippet for that in the submit.yml.erb already, which looks like this:

```auto
<%-
  emailcmd = '/uufs/chpc.utah.edu/sys/bin/CHPCEmailLookup.sh ' + ENV["USER"]
  emailaddr = %x[#{emailcmd}]
-%>
script:
  email: <%= emailaddr %>

```

So, I am wondering if I could do something similar, perhaps in the `# /etc/ood/config/apps/dashboard/views/support_ticket/email/_email.text.erb`? Or running the /etc/ood/config/ondemand.d/ondemand.yml through erb first?

Or, even better, knowing the user name, we could form the e-mail based on that (our user names are `u0123456`, and the corresponding e-mail is `u0123456@umail.utah.edu`).

Thanks,  
Martin

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 5, 2023, 8:02pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/2 "2023-07-05T20:02:31Z")

</div>

Regarding how it’s sending email —

If you do provide an SMTP address it attempts to use `localhost` as it’s SMTP server. We (OSC) have all our machines configured as STMP relays to our actual relay server. To test or verify your web servers setup I’d suggest getting an ssh session on that machine and see if you can `sendmail` or run other tests to see if that server can successfully relay messages.

If it can’t then you can either set the webserver up so that it can relay messages or just configure OnDemand to use your actual relay server.

Regarding the email address —

This is likely the easiest for you. We don’t support it on our side because that’s not the case for us, our email addresses could be anything. And what’s more, finding the users email address generally requires some privilege that users don’t have. I.e., most sites don’t allow anyone to query LDAP or if they do what’s returned is not sensitive like the email address.

```yaml
script:
  email: <%= Etc.getlogin %>@umail.utah.edu

```

---

<div class="post-metadata">

**Author:** ![mcuma](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mcuma/32/171_2.png) [@mcuma](https://discourse.openondemand.org/u/mcuma)\
**Post date:** [July 5, 2023, 8:27pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/3 "2023-07-05T20:27:52Z")

</div>

Thanks Jeff. I’ll ask our admins about the SMTP relay.

As for the email address - do I need to rename the ondemand.yml into ondemand.yml.erb to get that ruby processed?

And how would I feed the “from” e-mail into the form field, e.g. as in:

```auto
support_ticket:
  email:
    from: <%= Etc.getlogin %>@umail.utah.edu
    to: "helpdesk@chpc.utah.edu"
  form:
    - email
    - subject
    - attachments
    - description

```

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 5, 2023, 8:34pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/4 "2023-07-05T20:34:55Z")

</div>

> [@mcuma](#):
>
> As for the email address - do I need to rename the ondemand.yml into ondemand.yml.erb to get that ruby processed?

I don’t think so.

> [@mcuma](#):
>
> And how would I feed the “from” e-mail into the form field, e.g. as in:

I believe you have it already there. Though you don’t need the `email` field in the form if you’ve already hard coded the `from` section.

---

<div class="post-metadata">

**Author:** ![mcuma](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/mcuma/32/171_2.png) [@mcuma](https://discourse.openondemand.org/u/mcuma)\
**Post date:** [July 11, 2023, 4:44pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/5 "2023-07-11T16:44:19Z")

</div>

Hi, I have another question on the support ticket.

I noticed that one gets a link for support ticket from each interactive job tiles. That’s great, but, I am wondering if we could auto-populate the Session ID, or its URL or path in the subject or body of the ticket e-mail message. That would be quite useful.

Thanks.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [July 11, 2023, 4:56pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/6 "2023-07-11T16:56:55Z")

</div>

I think if you add `session_id` to your `form` it’ll auto populate the session id. You may also want to provide `session_description` as it has a little more info than just the session id.

---

<div class="post-metadata">

**Author:** ![bmx](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bmx/32/1774_2.png) [@bmx](https://discourse.openondemand.org/u/bmx)\
**Post date:** [August 9, 2023, 8:51am UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/7 "2023-08-09T08:51:40Z")

</div>

Hi guys,

Not sure if this is the right place to ask but here it goes. I’m trying to configure the Support ticket feature using the OOD Ansible Role, but I could not find any docs on how to use it. Tried using `support_ticket` object/dictionary but it’s not working.  
Any suggestions? Maybe the answer is to open an Issue on Github?

Thanks in advance!  
B

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [August 9, 2023, 1:32pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/8 "2023-08-09T13:32:08Z")

</div>

> [@bmx](#):
>
> Any suggestions? Maybe the answer is to open an Issue on Github?

Yea I think that’s the best bet. Looks like we need to add support for it to the role.

---

<div class="post-metadata">

**Author:** ![bmx](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bmx/32/1774_2.png) [@bmx](https://discourse.openondemand.org/u/bmx)\
**Post date:** [August 18, 2023, 10:51am UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/9 "2023-08-18T10:51:24Z")

</div>

Hi @jeff.ohrstrom,

Did a PR few minutes ago, hope it helps!

Thanks again! Cheers  
B

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [August 18, 2023, 1:57pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/10 "2023-08-18T13:57:00Z")

</div>

Thanks! I got it and will merge it - there’s just some unrelated issues with the tests.

---

<div class="post-metadata">

**Author:** ![kilian](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kilian/32/61_2.png) [@kilian](https://discourse.openondemand.org/u/kilian)\
**Post date:** [October 19, 2023, 12:33am UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/11 "2023-10-19T00:33:50Z")

</div>

Hi!

To piggy back on this, is there a way to get the user’s email address from the authenticated session, by any chance?

For instance, when using OpenID Connect for authentication, the IDP can provide an email address as part of the OIDC claims. Is it possible to use that information here?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [October 23, 2023, 4:33pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/12 "2023-10-23T16:33:49Z")

</div>

> [@kilian](#):
>
> For instance, when using OpenID Connect for authentication, the IDP can provide an email address as part of the OIDC claims. Is it possible to use that information here?

We’ve considered this and could add it in the future - we just don’t have support across all authentication methods. Though clearly OIDC could work here, we just haven’t gotten around to implementing it.

---

<div class="post-metadata">

**Author:** ![kilian](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/kilian/32/61_2.png) [@kilian](https://discourse.openondemand.org/u/kilian)\
**Post date:** [October 23, 2023, 5:07pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/13 "2023-10-23T17:07:50Z")

</div>

Hi @jeff.ohrstrom

Thanks for the reply!  
I found this [discussion](https://discourse.openondemand.org/t/how-can-i-pass-oidc-claim-email-value-to-my-applications/2358) which asked about pretty much the same thing.

One simple solution could maybe to allow passing a certain set of sysadmin-configurable environment variables between the front-end Apache authenticating instance and the nginx PUNs?

It would certainly be a valuable addition to the feature set, given that many authentication backend provide contextual information about authenticated users (email address, group membership…) that could be certainly be handy and useful in custom PUN applications.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [April 20, 2024, 5:07pm UTC](https://discourse.openondemand.org/t/support-ticket-questions/2796/14 "2024-04-20T17:07:51Z")

</div>

Closed on April 20, 2024, 5:07pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
