小编Mat*_*rax的帖子

AWS Cognito 用户池 ID 和应用程序客户端 ID 是秘密吗?

所以2个问题。

  1. 是 Aws Cognito 用户池的 UserPoolId 和 AppClientId 秘密吗?
  2. 如果是这样,你如何保证它们的安全?我见过的所有库(aws-amplify/amazon-cognito-identity-js)似乎都是基于客户端的。

我在这里错过了什么。似乎您将这 2 条信息提供给任何拥有 Cognito 王国的 JS 访问密钥的恶意用户。

security amazon-cognito

10
推荐指数
1
解决办法
1747
查看次数

在下次调用之前中断 spring 调度程序任务

我有一个 Spring-Boot 应用程序,它将成为我们想要触发的其他几个进程的编排服务。我目前使用 Spring Scheduling 从数据库中动态拉取 crons 进行了设置。我加入了一个 rest 方法来触发从数据库中提取新的 cron 信息的过程。这个逻辑一切正常。唯一的“问题”是它不使用新的 cron 信息,直到下一次计划运行才能解决真正的问题。 有没有办法中断当前的触发器并使用更新的 cron 信息再次安排一个。 以下是申请参考:

package com.bts.poc;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@SpringBootApplication
@EnableScheduling
@RestController
@RequestMapping("/APSCommon/Scheduling")
public class Application implements SchedulingConfigurer {

    @Autowired
    private DynamicCron dynamicCron;
    @Autowired
    PropertyManager propertyManager;

    public static void main(String[] args) throws Exception {
        SpringApplication.run(Application.class);
    }

    private String cronConfig() {
        String …
Run Code Online (Sandbox Code Playgroud)

java cron spring-scheduled spring-boot

4
推荐指数
1
解决办法
3711
查看次数