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

Can not deploy the AI conversation if using OIDC for authentication #3123

Open
zxkane opened this issue Jan 18, 2025 · 1 comment
Open

Can not deploy the AI conversation if using OIDC for authentication #3123

zxkane opened this issue Jan 18, 2025 · 1 comment
Labels
aikit Related to Amplify AI kit Gen 2 pending-triage question Further information is requested

Comments

@zxkane
Copy link

zxkane commented Jan 18, 2025

Environment information

System:
  OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
  CPU: (8) x64 Intel(R) Xeon(R) Platinum 8488C
  Memory: 21.47 GB / 30.82 GB
  Shell: /usr/bin/zsh
Binaries:
  Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
  Yarn: 1.22.22 - ~/.linuxbrew/homebrew/bin/yarn
  npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
  pnpm: 9.6.0 - ~/.nvm/versions/node/v20.18.0/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: 1.5.1
  @aws-amplify/backend: 1.13.0
  @aws-amplify/backend-auth: 1.4.2
  @aws-amplify/backend-cli: 1.4.7
  @aws-amplify/backend-data: 1.4.0
  @aws-amplify/backend-deployer: 1.1.14
  @aws-amplify/backend-function: 1.12.0
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.4
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.4
  @aws-amplify/cli-core: 1.2.2
  @aws-amplify/client-config: 1.5.5
  @aws-amplify/deployed-backend-client: 1.5.0
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.12
  @aws-amplify/platform-core: 1.6.0
  @aws-amplify/plugin-types: 1.8.0
  @aws-amplify/sandbox: 1.2.9
  @aws-amplify/schema-generator: 1.2.6
  aws-amplify: 6.12.1
  aws-cdk: 2.176.0
  aws-cdk-lib: 2.176.0
  typescript: 5.7.3
AWS environment variables:
  AWS_REGION = us-east-1
No CDK environment variables

Data packages

[email protected] /data/git/game-match-playground
├─┬ @aws-amplify/[email protected]
│ └─┬ @aws-amplify/[email protected]
│   └── @aws-amplify/[email protected]
└─┬ @aws-amplify/[email protected]
  └─┬ @aws-amplify/[email protected]
    └── @aws-amplify/[email protected]

Description

Failed to the sandbox with below error,

Failed to instantiate data construct
Caused By: @auth directive with 'userPools' provider found, but the project has no Cognito User Pools authentication provider configured.

The conversation definition looks like below,

  chat: a.conversation({
    aiModel: a.ai.model(LLM_MODEL),
    systemPrompt: `blabla`,
    tools: [
...
      }),
    ],
  }).authorization(allow => allow.owner()),


export const data = defineData({
  schema,
  authorizationModes: {
    defaultAuthorizationMode: 'oidc',
    oidcAuthorizationMode: {
      oidcProviderName: process.env.OIDC_ISSUER_URL!,
      clientId: process.env.OIDC_CLIENT_ID!,
      oidcIssuerUrl: process.env.OIDC_ISSUER_URL!,
      tokenExpiryFromAuthInSeconds: 3600,
      tokenExpireFromIssueInSeconds: 3600
    }
  }
});
@AnilMaktala AnilMaktala added question Further information is requested aikit Related to Amplify AI kit labels Jan 21, 2025
@AnilMaktala
Copy link
Member

Hey @zxkane,Thank you for bringing this up. I'll review this with the Engineering team to confirm if ODIC is currently supported in AIkit. I’ll update the issue accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aikit Related to Amplify AI kit Gen 2 pending-triage question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants