<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Generating Temporary Access Keys for CML API Endpoints in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404748#M252375</link>
    <description>&lt;OL&gt;&lt;LI&gt;&lt;EM&gt;Is there a supported mechanism within the CML API v2 or cmlapi to generate temporary access keys with a specified expiration time?&lt;/EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Yes. You may consider using cmlv2 api createV2Key [1]. I am able to get a apikey created for myself with ttl as 5 days ie 30 Mar 2025.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;api request:&lt;/P&gt;&lt;PRE&gt;curl -X POST "https://trimmed.cloudera.site/api/v2/users/ngopinath/v2_keys" -H "accept: application/json" -H "Authorization: Bearer trimmed.trimmed" -H "Content-Type: application/json" -d "{ \"comments\": \"test\", \"expiry_date\": \"2025-03-30\", \"username\": \"ngopinath\"}"&lt;/PRE&gt;&lt;P&gt;api response:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;
  &lt;SPAN&gt;"api_key"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"trimmed.trimmed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"key_id"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"trimmed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"created_at"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"2025-03-25"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"expiry_date"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"2025-03-30"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"comments"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"test"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"audiences"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;
    &lt;SPAN&gt;"API"&lt;/SPAN&gt;
  &lt;SPAN&gt;]&lt;/SPAN&gt;
&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Since we have solution for Q#1, I presume following queries are invalidated. Let me know if you are able to proceed with api createV2Key.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[1] &lt;A href="https://docs.cloudera.com/machine-learning/cloud/rest-api-reference-ai-workbench/index.html#api-CMLService-createV2Key" target="_blank" rel="noopener"&gt;https://docs.cloudera.com/machine-learning/cloud/rest-api-reference-ai-workbench/index.html#api-CMLService-createV2Key&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Mar 2025 05:11:26 GMT</pubDate>
    <dc:creator>Gopinath</dc:creator>
    <dc:date>2025-03-25T05:11:26Z</dc:date>
    <item>
      <title>Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404708#M252357</link>
      <description>&lt;P&gt;Hello Cloudera Community,&lt;/P&gt;&lt;P&gt;I'm working on a project where I need to provide users with temporary access to call specific Cloudera AI API endpoints, particularly for interacting with deployed models.&lt;/P&gt;&lt;P&gt;My goal is to avoid granting users long-lived API V2 keys and instead generate short-lived, scoped access credentials that expire after a set time (e.g., 2 hours).&lt;/P&gt;&lt;P&gt;After exploring the CML API v2 and the cmlapi library, I'm finding it challenging to identify a direct method for generating these temporary, scoped access keys.&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Is there a supported mechanism within the CML API v2 or cmlapi to generate temporary access keys with a specified expiration time?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;If not, are there recommended alternative approaches for providing users with limited, time-bound access to CML API endpoints?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Are there plans to introduce temporary access key generation functionality in future CML releases?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Is there a best practice to follow for this kind of implementation?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm aiming for a solution that prioritizes security and minimizes the risk of exposing long-term credentials.&lt;/P&gt;&lt;P&gt;Any guidance or insights from the community would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 06:20:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404708#M252357</guid>
      <dc:creator>waelfatah</dc:creator>
      <dc:date>2026-04-21T06:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404719#M252360</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/125086"&gt;@waelfatah&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our CML experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/40384"&gt;@smdas&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/25179"&gt;@Mike&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/28743"&gt;@Gopinath&lt;/a&gt;&amp;nbsp;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 23:21:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404719#M252360</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2025-03-24T23:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404748#M252375</link>
      <description>&lt;OL&gt;&lt;LI&gt;&lt;EM&gt;Is there a supported mechanism within the CML API v2 or cmlapi to generate temporary access keys with a specified expiration time?&lt;/EM&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Yes. You may consider using cmlv2 api createV2Key [1]. I am able to get a apikey created for myself with ttl as 5 days ie 30 Mar 2025.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;api request:&lt;/P&gt;&lt;PRE&gt;curl -X POST "https://trimmed.cloudera.site/api/v2/users/ngopinath/v2_keys" -H "accept: application/json" -H "Authorization: Bearer trimmed.trimmed" -H "Content-Type: application/json" -d "{ \"comments\": \"test\", \"expiry_date\": \"2025-03-30\", \"username\": \"ngopinath\"}"&lt;/PRE&gt;&lt;P&gt;api response:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;
  &lt;SPAN&gt;"api_key"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"trimmed.trimmed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"key_id"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"trimmed"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"created_at"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"2025-03-25"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"expiry_date"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"2025-03-30"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"comments"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"test"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"audiences"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;
    &lt;SPAN&gt;"API"&lt;/SPAN&gt;
  &lt;SPAN&gt;]&lt;/SPAN&gt;
&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Since we have solution for Q#1, I presume following queries are invalidated. Let me know if you are able to proceed with api createV2Key.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[1] &lt;A href="https://docs.cloudera.com/machine-learning/cloud/rest-api-reference-ai-workbench/index.html#api-CMLService-createV2Key" target="_blank" rel="noopener"&gt;https://docs.cloudera.com/machine-learning/cloud/rest-api-reference-ai-workbench/index.html#api-CMLService-createV2Key&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 05:11:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404748#M252375</guid>
      <dc:creator>Gopinath</dc:creator>
      <dc:date>2025-03-25T05:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404863#M252381</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/125086" target="_blank"&gt;@waelfatah&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; is&amp;nbsp;createV2Key working for you?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 11:08:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404863#M252381</guid>
      <dc:creator>Gopinath</dc:creator>
      <dc:date>2025-03-26T11:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404881#M252382</link>
      <description>&lt;P&gt;Thank you for answering !&lt;/P&gt;&lt;PRE&gt;curl -X POST "https://trimmed.cloudera.site/api/v2/users/ngopinath/v2_keys" -H "accept: application/json" -H "Authorization: Bearer trimmed.trimmed" -H "Content-Type: application/json" -d "{ \"comments\": \"test\", \"expiry_date\": \"2025-03-30\", \"username\": \"ngopinath\"}"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Is it possible to provide a username and a password instead of the bearer in the authorization header?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2025 14:33:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404881#M252382</guid>
      <dc:creator>waelfatah</dc:creator>
      <dc:date>2025-03-26T14:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404930#M252397</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/125086"&gt;@waelfatah&lt;/a&gt;&amp;nbsp;Based on the way, CAI handles the v2 API call, I don't think cmlv2api support simple authentication.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2025 12:22:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/404930#M252397</guid>
      <dc:creator>Gopinath</dc:creator>
      <dc:date>2025-03-27T12:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Generating Temporary Access Keys for CML API Endpoints</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/405224#M252436</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/125086"&gt;@waelfatah&lt;/a&gt;&amp;nbsp;Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 15:48:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Generating-Temporary-Access-Keys-for-CML-API-Endpoints/m-p/405224#M252436</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2025-04-01T15:48:36Z</dc:date>
    </item>
  </channel>
</rss>

